medly / medly-components

🧩 Medly components provides numerous themable react components, each with multiple varitaions of sizes, colors, position etc.
https://medly.github.io/medly-components/
MIT License
79 stars 54 forks source link

bug: SingleSelect onBlur event not removing the focus #728

Closed Bhusnar5044 closed 1 year ago

Bhusnar5044 commented 1 year ago

Describe the bug

SingleSelect onBlur event not removing the focus, still able to open the drop-down after onBlur event using arrow keys

To Reproduce

  1. create a ref object and pass it to the SingleSelect component
  2. perform blur event using ref, based on some event, or perform it in useEffect.
  3. now open the dropdown using the down arrow key
  4. You'll see the drop-down opening

Expected behavior

blur event should remove the focus entirely form the field. It should not open drop down.

Package versions