Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown duplicates options key #2545

Closed
anil-suthar opened this issue May 17, 2022 · 0 comments
Closed

Dropdown duplicates options key #2545

anil-suthar opened this issue May 17, 2022 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@anil-suthar
Copy link

anil-suthar commented May 17, 2022

I'm submitting a ...

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primevue/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=110

CodeSandbox Case (Bug Reports)
There is an issue with Dropdown search.
I have reviewed the sample code of Dropdown component here : https://codesandbox.io/s/1qdiug?file=/src/DropdownDemo.vue
I'm testing Advanced with Templating, Filtering and Clear Icon example.

Current behavior
Here while you have multiple options with same name, the search result shows duplicate options.

Check screenshot:
practical-sara-klymlz - CodeSandbox - Awesome Screenshot

I have used following options:

            ...
            countries: [
                {name: 'Australia', code: 'AU'},
                {name: 'Brazil', code: 'BR'},
                {name: 'China', code: 'CN'},
                {name: 'Egypt', code: 'EG'},
                {name: 'France', code: 'FR'},
                {name: 'Germany', code: 'DE'},
                {name: 'India', code: 'IN'},
                {name: 'India', code: 'AA'},
                {name: 'India', code: 'BB'},
                {name: 'India', code: 'CC'},
                {name: 'Japan', code: 'JP'},
                {name: 'Spain', code: 'ES'},
                {name: 'United States', code: 'US'}
            ],
            ...

Here India is used multiple times with different code but while searching Ind it shows 12/13 times.

Expected behavior
Search should find exact number of results. In this example, India should be shown 4 times only while searching Ind.

Please tell us about your environment:
OS : Windows

  • Vue version: 3.X

  • PrimeVue version: 3.12.X

  • Browser: [all]

@tugcekucukoglu tugcekucukoglu added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label May 23, 2022
@tugcekucukoglu tugcekucukoglu changed the title Dropdown component search shows duplicate options Dropdown duplicates options key May 27, 2022
@tugcekucukoglu tugcekucukoglu added this to the 3.12.7 milestone May 27, 2022
@tugcekucukoglu tugcekucukoglu self-assigned this May 27, 2022
tugcekucukoglu added a commit that referenced this issue May 27, 2022
Fixed #2545 - Dropdown duplicates options key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants