Closed psiho closed 3 years ago
I believe this is because the setSelectedItemNames
function is never triggered on the reset button click event.
Here's a CodeSandbox where I use a handleReset
function to trigger both the setSelectedItems
and setSelectedItemNames
. I also moved the functions above the return statement for some cleanup.
CodeSandbox: https://codesandbox.io/s/stupefied-sea-sunnk?file=/index.js
This is resolved in latest (v6.2.0): https://codesandbox.io/s/quizzical-worker-70tvd
CodeSnbox is here: https://codesandbox.io/s/gifted-dan-tiyhl
Open menu, select all options, then click "reset state to cucomber" button in the title.... visually all seems ok, but now click on Apple. Nothing happens because (check console), event "onDeselect" is emitted even if Apple is not selected.