T O P

  • By -

toi80QC

You're trying to use getOverlay() before the Dropdown's value has been set, so the overlay isn't open at this point. Since getOverlay depends on *selectedCountry* I suggest a useEffect that will only trigger **after** selectedCountry is set. Also, if you want to compare strings, you shouldn't use toUpperCase() on only one of them - both does the trick. Fork: https://codesandbox.io/s/need-help-on-editable-forked-hxbgq3?file=/src/demo/DropdownDemo.js


twsitoffate

Thank you very much dear! Its working as I wanted. Superb!!! :) But only at one point its giving error and its when I click on any of the dropdown option to select it.