Table filter - how to preset a filter

UI Components for Angular
Post Reply
Syrrius78
Posts: 3
Joined: 10 Jun 2021, 18:31

20 Sep 2022, 14:47

Hello all,

I totally like the example "Filter Row" in https://www.primefaces.org/primeng/table/filter.

But I have a question :
How could I preset, for example, the "Verified" checkbox to have directly the non-verified data ?
(try playing with stackblitz to do that but it doesn't work what I try)

thanks in advance for your help.

Syrrius78
Posts: 3
Joined: 10 Jun 2021, 18:31

21 Sep 2022, 16:10

I may have found how to do that.
Don't know if it's the best solution but it seems to work.
(doing the sort when we receive the data)

Code: Select all

    this.customerService.getCustomersLarge().then(customers => {
      this.customers = customers;
      this.loading = false;

      this.customers.forEach(
        customer => (customer.date = new Date(customer.date))
      );

      this.dt2.filter(true, 'verified', 'equals');  // how to do the job (preset)
    });

sidhuthe88
Posts: 1
Joined: 21 Sep 2022, 23:46

21 Sep 2022, 23:47

I can't seem to find this Custom Auto Filter option, I tried going to DATA-->Filter and also from the dropdown filter sort but I don't see custom filter.

maybe it's because it's a pivot table?

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 7 guests