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
I propose adding an onNavigate prop to the Select component in the Ink UI library. This enhancement will enable developers to implement custom behavior when navigating through options using the keyboard arrow keys. Currently, the Select component supports selection changes through the onChange prop, which triggers when an option is selected via the Enter key. The new onNavigate prop would complement this by handling state changes or side effects during the navigation process before an option is selected.
Expected Behavior
The onNavigate prop should be a function that gets executed every time a user navigates to a new option using the arrow keys. It could be useful for scenarios such as previewing option details or updating the application state based on the currently focused option.
Description
I propose adding an
onNavigate
prop to theSelect
component in the Ink UI library. This enhancement will enable developers to implement custom behavior when navigating through options using the keyboard arrow keys. Currently, theSelect
component supports selection changes through theonChange
prop, which triggers when an option is selected via the Enter key. The newonNavigate
prop would complement this by handling state changes or side effects during the navigation process before an option is selected.Expected Behavior
The
onNavigate
prop should be a function that gets executed every time a user navigates to a new option using the arrow keys. It could be useful for scenarios such as previewing option details or updating the application state based on the currently focused option.Use Case Example
The text was updated successfully, but these errors were encountered: