komarovalexander / ka-table

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

Set limit of elements for virtual scrolling #319

Closed Kvashnin-firstis closed 11 months ago

Kvashnin-firstis commented 1 year ago

Greetings, is it possible to set your own item limit in VirtualScrolling in KaTable? Right now the number of elements is different all the time, it's basically a couple at the top, a couple at the bottom and all in the actual level. I would like to have a feature that would allow you to set your own number.

komarovalexander commented 1 year ago

Hi @Kvashnin-firstis it is not possible. Why do you need it? It is calculated based on container width

Kvashnin-firstis commented 1 year ago

In my case it's needed for getting HTMLElement of selected item, in such a big table I want to use virtualScrolling, but in first load I will have around 100 elements and I would like to have access to them. The first action what I need it's scroll with using scrollIntoView and after simulate click to selected element. Of course, all of this can be done by yourself and without using direct access to the elements, but it would be useful to have such a property.