Hi there, I am using a DataTable with global filter:
<div class="ui-widget-header ui-helper-clearfix ui-g-nopad ui-g-12" style="padding:4px 10px;">
<i class="fa fa-search" style="float:left;margin:1px 5px 0 0"></i>
<input #filter type="text" pInputText size="50" style="float:left;" placeholder="Suche">
</div>
<div class="ui-g-nopad ui-g-12">
<p-dataTable class="ui-g-nopad" id="TBL_dat" [value]="datasets" scrollable="true" scrollWidth="100%" scrollHeight="700px"
[globalFilter]="filter" selectionMode="single" [(selection)]="selectedDataset" [lazy]="true"
[paginator]="true" [rows]="25" [totalRecords]="totalRecords" (onLazyLoad)="loadDataLazy($event)">
<p-column field="setnumber" header="Nr." [style]="{'width':'35px'}"></p-column>
<p-column field="dataset" header="Datensatz" [style]="{'width':'47000px'}" ></p-column>
</p-dataTable>
The globalFitler does not work here, I guess it's because of the datasets length (its about 2800), but I'm not quite sure. I already tried disabling other options and even tried it with ONLY globalFilter enabled, but same issue.
On other DataTables I use it works perfectly fine, but with huge Datasets like this it doesnot. Datasets are strings btw, setnumbers are.. well. Numbers.
If there is a mistake in my code, let me know, otherwise I think this is a bug.
Hi,
were you able to resolve it? I'm having the same issue.
looking at the lazyload Datatable code, I could figure out that:
If lazy loading is applied, DataTable does not support automatic filtering/sorting etc.. you might need to explicitly set the options in the LazyLoadEvent
This might be a new feature request and not a bug.
I don't think we pass global filter to LazyLoadEvent, we should.
Most helpful comment
I don't think we pass global filter to LazyLoadEvent, we should.