-
Notifications
You must be signed in to change notification settings - Fork 83
<MultiSelect.Filterable component select all, all items not selecting, although state updating in react. #710
Comments
hi @hrshtpnt can you create a reduced test case in Code Sandbox for easier testing and debugging? |
Thanks for looking into the issue @RobertaJHahn, @emyarod |
it looks like you are using the Carbon React component which does not support fully uncontrolled use cases, so the menu closing is a direct result of rerendering the component (because the related carbon-design-system/carbon#2623 |
Already raised a request for it, here is the link carbon-design-system/carbon#9819 @emyarod since the state/prop provided to it is changing for selected items, should the component not rerender on its own as it's a prop in the component? Looks like it's an existing defect in the @gdelory already provided a temporary solution to the deselection in another thread. I was looking for a similar solution for select-all scenario if possible until the component is fully controllable. |
unfortunately that seems to be the only way to implement something close to a select-all scenario with the current React multiselect, although this may be more easily achievable using if you intend to continue using Carbon React then the issue you created there should be the one to watch |
Can you elaborate on the solution you are proposing? I don't understand the |
@hrshtpnt according to the code sandbox you provided you're using |
Yes I am using |
@hrshtpnt yes I believe this is achievable using with the version of |
URGENT HELP NEEDED
I added select all option within the list, but the component does not re-render even when the state is changing and updating. Is there a way to re-render the component.
I tried to use a key prop key={Math.random()} with this my logic seems to work but the dropdown collapses/re-renders on each item select.
The text was updated successfully, but these errors were encountered: