komarovalexander / ka-table

Lightweight MIT React Table component with Sorting, Filtering, Grouping, Virtualization, Editing and many more
http://ka-table.com
MIT License
787 stars 58 forks source link

Alternate row background in virtualize mode #428

Closed dyaacov closed 4 months ago

dyaacov commented 4 months ago

Hi All,

I'm trying to set different background color for even rows. In virtualize, while scrolling, even and odd are changing all the time.

Is there another solution to overcome this situation?

Thanks!

komarovalexander commented 4 months ago

Hi @dyaacov there is an ability to do that using childComponents.dataRow demo: https://stackblitz.com/edit/table-many-rows-ts-bmfyda?file=Demo.tsx,style.scss,index.tsx

but I will keep this issue open for a while, will wait further requests. It looks like a candidate to implement out-of-the-box as a separate option

dyaacov commented 4 months ago

Works great! Thanks

komarovalexander commented 2 months ago

Hi @dyaacov oddEvenRows property has been added in 11.1.0: https://github.com/komarovalexander/ka-table/releases/tag/11.1.0