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 - search filter not working well due to duplicate key issue. #732

Closed Bhusnar5044 closed 1 year ago

Bhusnar5044 commented 1 year ago

Describe the bug

SingleSelect - search option not showing the specific option, it shows other options as well. We have used the label as a key for Options React facing difficulty in figuring out the change.

To Reproduce

Provide step-by-step instructions to reproduce the bug:

  1. add duplicate options with the same label.
  2. filter options using a search filter.
  3. You can check now it doesn't show filtered options.

Expected behavior

If there is a duplicate option with the same label and different value, and the user tries to search the option, it should show only searched options.

Screenshots

If applicable, provide screenshots to explain the bug.

Package versions