downshift icon indicating copy to clipboard operation
downshift copied to clipboard

feat: Allow string highlightedIndex in fully controlled environment

Open haxxxton opened this issue 3 years ago • 0 comments

I have a scenario where i have nested selection options within collapsible regions of the Downshift menu. To facilitate full keyboard control of this component, i have created an index scheme like 0-1 to indicate the first collapsible region, and the second item within that. Highlighting of just the collapsible title/control has an index like 0. I am using the stateAndReducer prop to fully control the changing of the highlight index via keyboard controls, and selection of items. However, my defaultHighlightedIndex is then a string; which produces a propTypes warning of: image

Would it be possible to change this property to accept either a number or a string? or even an option to suppress this warning?

haxxxton avatar Oct 02 '21 06:10 haxxxton