Enhancement Request for Select Component - Adding cause Attribute to onHighlightChange Event #1092
AndrejNemec
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Hi, thank you for the proposition. It's a subject to the Zag. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to propose an enhancement to the Select component, specifically related to the
onHighlightChange
event. It would be highly beneficial to include an additional attribute:cause
, in the event details. This attribute would store information about the event that triggeredonHighlightChange
.The main reason for this enhancement is to aid in the development of virtual selectors. Currently, when creating a virtual selector, invoking
scrollToIndex
from a virtualizer within theonHighlightChange
event is also executed during hover actions. This can cause undesirable shaking if the element is outside of the viewport.The proposed
cause
attribute would have values like 'hover', 'keyboard', 'typeahead', 'open', etc.
This addition would provide more control and precision in handling different scenarios, improving the usability and functionality of virtual selectors.Beta Was this translation helpful? Give feedback.
All reactions