Happy-Coding-Clans / vue-easytable

A powerful data table based on vuejs. You can use it as data grid、Microsoft Excel or Google sheets. It supports virtual scroll、cell edit etc.
https://happy-coding-clans.github.io/vue-easytable/
MIT License
3.63k stars 725 forks source link

[Bug Report] Performance issue: clicking on a row causes every row in the table to re-render #410

Open stephantabor opened 2 years ago

stephantabor commented 2 years ago

https://github.com/Happy-Coding-Clans/vue-easytable/blob/674d87e8e72151bf02844a53c7245ae55ceb8468/packages/ve-table/src/body/body-tr.jsx#L98-L101

One of the reasons seems to be that every table row receives the highlighted row index as a prop. Every time a user clicks a different row that index will change causing every row to re-render.

Using the clickHighlight: false option to disable row highlighting on click doesn't change the behavior. It seems to just decide whether the class is applied, but the re-render still happens.

pallavbansal commented 11 months ago

Same Issue with me I am using latest version. Any solution ? @stephantabor @huangshuwei Can you help me here.