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

fix(core): singleSelect - search filter not working well due to duplicate key issue. #733

Closed Bhusnar5044 closed 1 year ago

Bhusnar5044 commented 1 year ago

affects: @medly-components/core

ISSUES CLOSED: #732

PR Checklist

Description

singleSelect - search filter not showing the filtered options, If there is any duplicate option available with a different value, the search not showing those options.

Type of change

Fixes #732

What is the current behaviour?

Search not filtering the options if it contains duplicate label option.

What is the new behaviour?

Search shows the filtered options even if there are any duplicate options with the same label.

Does this PR introduce a breaking change?

Checklist

nx-cloud[bot] commented 1 year ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 91c600529dcf8bde7b795fbaf892a4ea14e1f90d. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 2 targets - [`lerna run build`](https://cloud.nx.app/runs/VyJYKwsQej) - [`lerna run lint`](https://cloud.nx.app/runs/SKWkoJy1xe)

Sent with 💌 from NxCloud.

gmukul01 commented 1 year ago

@Bhusnar5044 Values should always be unique hence we can remove adding the index as key. This should also remove the sonar error.

Bhusnar5044 commented 1 year ago

@Bhusnar5044 Values should always be unique hence we can remove adding the index as key. This should also remove the sonar error.

done :+1:

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication