perf: simplify table selection-checkbox model #7367
Merged
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
The checkbox for selection in the ResourceTable had the selected
resources as model, which lead to the virtual dom of all checkboxes
being invalidated if the selection got changed at all (adding / removing
one item to/from the selection). Changed the checkbox model to only
reflect the selection state of the one resource it is about. With this
only the virtual dom of the checkboxes gets invlidated that were added
to or removed from the selection.
We still have the issue that the virtual dom of every single
td
andtr
is invalidated (at least with Vue2), but at least for the checkboxes it's not for all rows anymore but only for the rows that were modified by the selection model change.Related Issue
Types of changes
Checklist: