0

PrimeNG datatable has an option [filter]="true" which enables an input on column header used to filter data. Additionally the API provides a callback onFilter fired when filtering data.

Typing into the provided input for filtering data causes the table to run filtering on data in the table. In the callback I reload my data filtered from server which cases the data to be filtered twice. Can I disable the default filtering and at the same time have the input field in column header and onFilter callback available?

Antikhippe
  • 6,316
  • 2
  • 28
  • 43
user4401
  • 394
  • 1
  • 4
  • 15
  • Of course it is an option to write my own component which will handle sorting and/or filtering, but if it's possible I'd like to use DataTable featurs. – user4401 Aug 18 '16 at 20:43
  • You can use column header template which can have input text box and a callback function when user types in it, in call back function you can filter or sort or load data from backend based on input text. – TimeTraveler Jul 03 '17 at 07:26

0 Answers0