komarovalexander / ka-table

Lightweight MIT React Table component with Sorting, Filtering, Grouping, Virtualization, Editing and many more

Home Page:http://ka-table.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Virtual Scroll not working when pagination is set

gopalkcts opened this issue · comments

Hi Alex
When I set the below config for the table

const tablePropsInit: ITableProps = {
columns: columnsArray,
data: data.queryResponse.dataRecords,
rowKeyField: 'id',
virtualScrolling: {
enabled: true
},
filteringMode:FilteringMode.FilterRow,
sortingMode:SortingMode.Single,
selectedRows:[0],
columnResizing: true,
width:3000,
paging: {
enabled: true
},
};

I see virtual scrolling is not working. Could you please check?

Hi @gopalkcts this is because you did not set pageSize property

paging: {
  enabled: true,
  pageSize: 100
},

by default, pageSize is 10 so there is no need for virtual scrolling, probably all of them are shown on one page without scrolling