I'm trying to clear the selected option every time the user opens the dropdown box.
Currently, when I select an option and open the dropdown again, the previously selected option remains selected.
I've changed the nullable property to true, but that didn't work.
The following is the code: https://codesandbox.io/s/clever-chaum-94xsng?file=/src/FilterDropdown.js
You can try using the
open
attribute in the render function. It tells us whether the dropdown box is open. I made a very simple example.Here is the complete code. Give it a try.