Primeng: Pass global filter to LazyLoadEvent

Created on 3 Aug 2016  路  3Comments  路  Source: primefaces/primeng

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.

Most helpful comment

I don't think we pass global filter to LazyLoadEvent, we should.

All 3 comments

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

image

This might be a new feature request and not a bug.

I don't think we pass global filter to LazyLoadEvent, we should.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cyberrranger picture cyberrranger  路  3Comments

papiroca-tm picture papiroca-tm  路  3Comments

lilling picture lilling  路  3Comments

jisqaqov picture jisqaqov  路  3Comments

garethlewis picture garethlewis  路  3Comments