reactjs - How to highlight only selected row in a large table set in React? -
i'm working on table component react , i'm encountering issue large table set (> 500 rows). indeed, when try highlight row clicked on, encounter big leak in performances.
in order achieve row selection, i'm holding state containing active row in top component consists of container rows in table. when click on cell, i'm updating state row cell part of.
this cause trigger of render() method top component , whole application becomes slow due huge amount of elements re-rendered.
how can re-render selected row? there general best-practice avoid re-render of components under top component?
what using css? can use :hover property on each row , change background color each time mouse on or clicked. performance stress low if use css property.
good luck
Comments
Post a Comment