I am facing an issue with the DataTable component. When I am using the lazy parameter I can use filters with no problem but when i'm using lazy + filter it's not filtering my table
this way the filter is working fine :
Code: Select all
<div className="card">
<h5>Virtual Scroll</h5>
<DataTable
value={virtualCustomers}
scrollable
scrollHeight="200px"
//lazy
rows={20}
loading={virtualLoading}
virtualScroll
virtualRowHeight={45}
onVirtualScroll={onVirtualScroll}
totalRecords={lazyTotalRecords}>
<Column field="name" header="Name" loadingBody={loadingText} filter></Column>
<Column field="country.name" header="Country" loadingBody={loadingText}></Column>
<Column field="representative.name" header="Representative" loadingBody={loadingText}></Column>
<Column field="status" header="Status" loadingBody={loadingText}></Column>
</DataTable>
</div>
Code: Select all
<div className="card">
<h5>Virtual Scroll</h5>
<DataTable
value={virtualCustomers}
scrollable
scrollHeight="200px"
lazy
rows={20}
loading={virtualLoading}
virtualScroll
virtualRowHeight={45}
onVirtualScroll={onVirtualScroll}
totalRecords={lazyTotalRecords}>
<Column field="name" header="Name" loadingBody={loadingText} filter></Column>
<Column field="country.name" header="Country" loadingBody={loadingText}></Column>
<Column field="representative.name" header="Representative" loadingBody={loadingText}></Column>
<Column field="status" header="Status" loadingBody={loadingText}></Column>
</DataTable>
</div>