-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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] v-datatable checkbox selection is slow when there is large data rendered #5986
Comments
Duplicate of #2574 See #3435, vuejs/vue#6351 |
@KaelWD |
#2574 was complaining about a serious performance problem with 150, I demonstrated a minor problem with 500. This is a problem with vue and complex components, the only way we could fix it is to remove features. I believe they're intending to improve slot handing in vue 3.0 which should mitigate the problem somewhat. |
Seeing this issue here. Incredibly taxing on the system trying to select all on large data sets. Once selecting all, trying to unselect just one takes a good few minutes. Need a resolution to this. Removing |
We had this issue with a huge table, with vuetify 1.5 and vuetify 2 (different projects). For a large number of rows it is almost unusable, because it rerender everything for every action on the table. @lrosemberg investigated and found the problem and a solution. For vuetify 2, your custom slots should be components instead of inline templates. I changed the vuetify datatable example to validate the issue and the solution. Original code:
Fixed example (check console logs to understand): https://codepen.io/iurisilvio/pen/XWbbKOP For vuetify 1.5 we have a solution too, but because you don't have the |
in short: don't call any functions inside of table cell slots - in this case they would be called on each selection change. Instead, put your function calls deeper - inside components, or outside of table (memoizing call results in data object). |
Thanks for the insight here @iurisilvio. Was facing the same issue with the |
Versions and Environment
Vuetify: 1.3.15
Vue: 2.5.17
Browsers: Chrome 71.0.3578.98
OS: Linux x86_64
Steps to reproduce
In the given codepen, select a row in the table.
You'll notice a lag in the selection of the checkbox. The number of rows is around 1800. It looks like the lag is due to the ripple on the checkbox,but, I may be wrong here.
My use case required a different background-color for the selected rows. The lag is prominently visible if we use a different background color for the
active
rowsExpected Behavior
The checkbox should be selected without any lag for large datasets also.
Actual Behavior
Checkbox in data-table gets selected after a certain lag
Reproduction Link
https://codepen.io/anon/pen/oJeBjJ
The text was updated successfully, but these errors were encountered: