react-md icon indicating copy to clipboard operation
react-md copied to clipboard

Update Select to be able to render elements other than Options

Open mlaursen opened this issue 5 years ago • 0 comments

Description

It would be helpful to be able to render elements that are not Options in the Select/Listbox components like a Divider. The current implementation forces every option to be rendered as an Option due to the useActiveDescendantMovement usage.

Additional Information

This also is an issue with the AutoComplete component since it implements a custom Listbox as well.

Current Workaround

You can currently add a custom className to an Option which applies the divider border-bottom behavior, but you won't be able to have the same spacing/margin as the Divider component.

Code sandbox for the workaround: https://codesandbox.io/s/dank-dew-yppw7?file=/src/CustomChildren.tsx

mlaursen avatar Aug 10 '20 16:08 mlaursen