You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One thing I noticed is that the Ark UI Menu component is not type-safe (unlike Select, for example):
it does not accept a collection. This means the onSelect in Menu.Root si not coupled with the values in Menu.Item whatsoever
Menu.Item does not accept an onSelect prop, which would be another approach to fixing this (so use onSelect per menu item isntead of on the root).
Does anyone on the Ark team have thoughts on this? I love the strong type polymorphism we get in Select (and other components that use collections) but found Menu's API to be quite lacking from this perspective and would love to see it improved
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
One thing I noticed is that the Ark UI
Menu
component is not type-safe (unlikeSelect
, for example):onSelect
inMenu.Root
si not coupled with the values inMenu.Item
whatsoeverMenu.Item
does not accept anonSelect
prop, which would be another approach to fixing this (so useonSelect
per menu item isntead of on the root).Does anyone on the Ark team have thoughts on this? I love the strong type polymorphism we get in
Select
(and other components that use collections) but foundMenu
's API to be quite lacking from this perspective and would love to see it improvedThanks!
Beta Was this translation helpful? Give feedback.
All reactions