Closed MIGUELez11 closed 2 years ago
@achmurali I thought this was fixed, can you have a look at that?
@rtivital @achmurali As I've seen, in commit a265744 it was fixed when pressing Backspace
and on handleClear
but not on value
or maxSelectedValues
change.
What package has an issue
@mantine/core
Describe the bug
You can select values from the dropdown when having a
MultiSelect
component with themaxSelectedValues
prop. When reached the limit, a React ref (valuesOverflow
) is set to true, and the dropdown does not appear anymore.The problem is when you update any of the following props:
value
ormaxSelectedValues
, the React ref is not recalculated, and you can not keep selecting items (if thevalue
updated to a lower length or themaxSelectedValues
is increased).In which browser did the problem occur
Brave, Chrome
If possible, please include a link to a codesandbox with the reproduced problem
https://codesandbox.io/s/unruffled-orla-mtl75y?file=/src/App.js
Do you know how to fix the issue
Yes
Are you willing to participate in fixing this issue and create a pull request with the fix
Yes
Possible fix
Update the React ref valuesOverflow when the value or the
maxSelectedValues
props are updated.