Previously, grouped options broke MenuList because the flattenGroupedChildren helper assumes that all children occur in groups.
However, with CreatableSelect, the "Create ..." option occurs outside of a group, as a lone Select option.
This PR introduces a typecheck and correct handling for this case, and also adds a working (and verifiable) grouped option to the Storybook story for CreatableSelect.
Fixes #117
Previously, grouped options broke
MenuList
because theflattenGroupedChildren
helper assumes that all children occur in groups. However, withCreatableSelect
, the "Create ..." option occurs outside of a group, as a loneSelect
option.This PR introduces a typecheck and correct handling for this case, and also adds a working (and verifiable)
grouped
option to the Storybook story forCreatableSelect
.