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

[Bug Report][3.7.4] The v-data-table-server is duplicating results with the same key #20675

Open
Some-Random-D-e-v opened this issue Nov 6, 2024 · 0 comments

Comments

@Some-Random-D-e-v
Copy link

Some-Random-D-e-v commented Nov 6, 2024

Environment

Vuetify Version: 3.7.4
Vue Version: 3.4.37
Browsers: Chrome 130.0.0.0
OS: Windows

Steps to reproduce

In the code, I added an extra object to the data array, as shown below:

{
  name: 'Frozen Yogurt',
  calories: 159,
  fat: 6,
  carbs: 24,
  protein: 4,
  iron: '1',
}

The table is using the item-value="calories" attribute.

Even after replacing the data, the issue persists: duplicate items continue to appear in the table.

Steps to Reproduce:

  1. Set "Items per page" to "all" , 100 or 50.
    2.Click the sort button for the 'calories' column multiple times.
    3.Observe the following:
    A warning appears: "Duplicate keys found during update."
    The row for "Frozen Yogurt" is duplicated.
    Some values sort correctly, while others do not.

Expected Behavior

A warning about duplicate keys appears in the console. The expected behavior is either for the result to be updated correctly, or for the operation to have no effect.

Actual Behavior

A warning is displayed, and duplicate key items are added twice. When replacing the table data, the old duplicate key items persist in the table.

Reproduction Link

https://play.vuetifyjs.com/#...

I also managed to do this for the v-data-table
https://play.vuetifyjs.com/#eNrNkj1vgzAQhv/KyUsWAmq7IRKJIW2HdGq3kOGAi2IJjGUfqFKU/15jh4ZkbId28cd7750f27c7CWuqJNc6HnoSqciYWt0g07pQANmwRK390m+qTjFKReYiebFGxiVj2RCk0qXbVSH8XIh1lszjUyEn3lYalXBQlswAMlsZqRkscR8oXJpl8NVhBbtQ7zTByDqFh2jaKWwphUV+MLJCBZuG9BEVL74NVlMlyTrPtvvs6pEIMLjx6qolsbO8kinl0Bm6Ro5YSsYx+I4DKoURPDuDZTt5zpf5hvDpnnArO/VDqrdN/vFroMd7oBdp8DC76B891L/8yiSBOI6hddHQh6O8Hxs3NKtrU3GOVN80fth/ATv+BmQ=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant