Angular: Filter on number, can't get it to work. #5887
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hi, as I remember if you don't define a column
In the Angular example
Depend on how you want to filter the data. You definitely need to use the https://tanstack.com/table/latest/docs/guide/column-filtering#filterfns If you want to search for the exact id, you can use the default I'd do something like this {
filterFn: (row, columnId, filterValue) => {
const id = String(row.original.customerId);
return id.includes(String(filterValue))
},
}, |
Beta Was this translation helpful? Give feedback.
-
|
defining a column filter worked, thanks |
Beta Was this translation helpful? Give feedback.

Hi, as I remember if you don't define a column
filterFns, a tableglobalFilterFnswill be used, which is 'includesString' as default .In the Angular example
changeEventis a custom output bound by thedebounceInputdirective, which basically debounce thechangeevent. You can still use native inputchangeif you want to update filters immediately when that dom event is triggered.Depend on how you want to filter the…