Replies: 7 comments
-
Nested Groups would be great as this would very much reflect similar structures we have elsewhere. And yes the To be fair I've not used creatable within a |
Beta Was this translation helpful? Give feedback.
-
It'd be nice if the library also implemented select-able groups I saw the example your comment here which does the job for the most part. But it'd be better/easier if react-select offered this out of the box. Something like this would be nice ng-s.mov |
Beta Was this translation helpful? Give feedback.
-
This feature has been requested for more than five years and is something that consistently comes up as a priority among react-select users. It would really be awesome if you could focus on making this happen since a lot of people have been asking for it for a long time. |
Beta Was this translation helpful? Give feedback.
-
Are you guys still up to this request? |
Beta Was this translation helpful? Give feedback.
-
Does anyone have a current workaround? What I really want is submenus but this feature would be good too. |
Beta Was this translation helpful? Give feedback.
-
Any updates on this feature? |
Beta Was this translation helpful? Give feedback.
-
I found this solution on one of this repo's discussion threads and just made some minor modifications. Don't remember which thread though. const Group = (props) => {
const hasSelectedOption = props.children.some((opt) => opt.props.isSelected);
const onClick = () => props.selectProps.onChange(props.options);
return (
<components.Group
{...props}
headingProps={{ ...props.headingProps, hasSelectedOption, onClick }}
/>
);
}; <AsyncSelect
onChange={handleSelectChange}
// ... other props removed for brevity
components={{
Group,
}}
value={selected}
isMulti
loadOptions={loadSuggestedOptions}
placeholder="Search for a location"
/> |
Beta Was this translation helpful? Give feedback.
-
I am gauging interest in a feature request for nested groups and wanted to reach out to the community to get feedback.
Regarding PR's: #2750, #3265, and #3873
I am creating this as a placeholder to get back to when I have more time to think through a number of considerations but some that appear top of mind are:
options
. While this is not a prerequisite, it certainly seems related to this implementation and perhaps something for us to better design around.react-select/packages/react-select/src/Select.js
Lines 1336 to 1340 in 998c979
Related Feature Requests
While the primary goal is to ensure the intended behavior of react-select is working well and performant, having the ability to support nested groups seems reasonable, but worth understanding impacts and concerns.
Please feel free to add more feedback for us to better gauge support for supporting this.
Beta Was this translation helpful? Give feedback.
All reactions