perf(VDataTable,VDataIterator)!: add item-id
and fix check/uncheck all entries performance
#20441
+78
−38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new
item-id
prop toVDataTable
andVDataIterator
usingid
when not configured (default).I need to add the new
item-id
to the api and check theselectStrategy
, looks like can be a custom object, checkselectStrategy
computed (L127) inpackages/vuetify/src/components/VDataTable/composables/select.ts
module in this PR (added TODO).Pending tasks:
VDataIterator
api docs includesitem-key
but missing in the props, should be renamed toitem-id
VDataTable
andVDataIterator
examples in docsSelectItemId
return type, maybe we can useany
item-id
We should review also the
item-value
and change it toundefined
, in the api docs usingid
.The performance issue in #19447 is the
isSelected
computed, with this PR just a map lookup using the newitem-id
.fixes #19447
Markup:
https://streamable.com/98scf9
10K rows VDataTable