koalyptus / TableFilter

A Javascript library making HTML tables filterable and a bit more :)
https://www.tablefilter.com
MIT License
324 stars 95 forks source link

custom filter on two columns? #844

Open taker218 opened 9 months ago

taker218 commented 9 months ago

Hi,

I'm currently trying to get a custom filter to work on two columns. If I apply the custom filter to each off them individually, it's working as expected, but I need to have the same filter (filter different time periods on a date) on two columns, so I can filter both of them.

Here's the code for the custom options that I thought would work custom_options: { cols: [1,2], texts: [ [ 'Letze Woche', 'Letzer Monat', 'Letzten 6 Monate', 'Letztes Jahr' ] ], values: [ [ '>' + oneweekago, '>' + onemonthago, '>' + sixmonthsago, '>' + oneyearago ] ], sorts: [false] }, The variables are declared prior to this and work just fine, if I have "cols:[1]" or "cols:[2]" in the file, but not with both of them in there.

Is this even possible or am I missing something here?

Best regards

rajpatelukyahoo commented 2 months ago

I am having the same problem.