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

Multiselect - Filter - Duplicate keys on search. #5455

Closed
botmaster opened this issue Mar 21, 2024 · 3 comments · Fixed by #5458
Closed

Multiselect - Filter - Duplicate keys on search. #5455

botmaster opened this issue Mar 21, 2024 · 3 comments · Fixed by #5458
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@botmaster
Copy link

botmaster commented Mar 21, 2024

Describe the bug

Hello,
I think I've found a bug with the multiselect filter.
If several options have the same name, the filter returns the same item several times when you start typing.
I think that the v-for used to generate the sugested list use the wrong key.

const cities = ref([
  { name: 'New York', code: 'NY' },
  { name: 'New York', code: 'NY1' },
  { name: 'New York', code: 'NY2' },
  { name: 'New York', code: 'NY3' },
  { name: 'Rome', code: 'RM' },
  { name: 'Rome', code: 'RM1' },
  { name: 'Rome', code: 'RM2' },
  { name: 'Rome', code: 'RM3' },
  { name: 'London', code: 'LDN' },
  { name: 'Istanbul', code: 'IST' },
  { name: 'Paris', code: 'PRS' },
]);

image

Reproducer

https://stackblitz.com/edit/hyqtgd?file=src%2FApp.vue

PrimeVue version

3.50.0

Vue version

3.x

Language

ES6

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@botmaster botmaster added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 21, 2024
@tugcekucukoglu
Copy link
Member

I've tried to see the same warnings but I can't. How can I replicate the issue?

Screenshot 2024-03-25 at 13 34 13

@tugcekucukoglu tugcekucukoglu added Resolution: Cannot Replicate Issue could not be replicated by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Mar 25, 2024
Copy link

We're unable to replicate your issue, if you are able to create a reproducer or add details please edit this issue. This issue will be closed if no activities in 20 days.

@aresofficial
Copy link

@tugcekucukoglu I reproduced it. Just start typing in the filter:

image
image

@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Resolution: Cannot Replicate Issue could not be replicated by Core Team labels Mar 28, 2024
@tugcekucukoglu tugcekucukoglu added this to the 3.51.0 milestone Mar 28, 2024
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.

3 participants