Closed alainpannetier closed 7 years ago
Hey,
Thanks for getting in touch,
Could you post a copy of your Tabulator constructor so i could test with your setup.
Cheers
Oli
groupby_issue_247_filter_issue_249.zip
Here is the requested tarball. You just need to unzip and load home.html in the browser. (You're also welcome to take the column chooser :) but it's below par).
Updated version. Now with solution to issue 247 (with a small change in tabular.js). I'll be working on this today but from my point of view the best solution would be to have a possibility to chain filters. Each column filter would register its standard filter, and API users could also register their filter). If you want I can try to contribute this.
Actually, this is too heavy from the upward compatibility perspective. Better wrap column filters in custom filter.
I managed to combine field-filtering and custom filtering through a few modifications. Here is the whole static project and a diff (I respected the tabs and the typos :) so that you have only the meaningful differences). I'm not "offended" if you don't apply the patch :) issues_247_249.solved.from.orig.repo.zip
Hey,
Thanks for the info. sorry for taking so long to get back to you, ive had a crazy busy couple of weeks at work.
Im creating the next version of Tabulator this weekend so i will review everything and get back to you.
Many Thanks
Oli
I understand :) :) Same here. Nut thanks so much for tabulator. All this work is very useful.
I'm also interested in custom filtering , but i would love to interface that with a header filter I don't know what exactly Alain's modifications changed exactly but looking only at the .diff it doesn't apear to do what i had in mind, even if interesting for the standardisation of filters inside tabulator
Some context :
In my tables, in certain cells an id is stored (ie:58), I allow change of this id by using a <select>
where the <option>
value are the id, and the text is a name (ie : <option value=58>Someone</option>
).
I use a formatter on the cell's column to transform any id to the corresponding text for it to be totaly transparent to the user.
Sometimes it might be interesting to use Header filter for those columns, but i can't ask the user to manualy enter the id (he probably don't know it) and using the same editor for the editor could be limiting to only one value.
So could it be possible to have a "customHeaderFilter" in the column definition that would act as a "filter comparator" between the value in the "headerFilter" field and the value in the row's cell and return true or false if the row pass the filter or not?
Currently i just don't allow user to do filtering in those column, lucky for me there is no need for it for me now.
Hi Paraplegix,
If I understand correctly you would like to type or select 'Someone' in the header filter and only id 58 rows would be filtered in. I did something different indeed. My filter buttons are not in the header = also because I need a 'or' condition on my filter. but basically what would be nice indeed would be to be able to customise the header filter display and resulting callback filter. I might give it a try (later :( though)
Hey,
Just a quick note to let you know that there will advanced filter functionality available in the upcoming 3.0 release later in May, it will allow for applying multiple filters and treating header filters and normal filters differently
Cheers
Oli
Many thanks Oliver. Can't wait. We're using Tabulator much more since we first tried it last month.
On Wed, May 3, 2017 at 12:53 AM, Oli Folkerd notifications@github.com wrote:
Hey,
Just a quick note to let you know that there will advanced filter functionality available in the upcoming 3.0 release later in May, it will allow for applying multiple filters and treating header filters and normal filters differently
Cheers
Oli
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/olifolkerd/tabulator/issues/249#issuecomment-298757761, or mute the thread https://github.com/notifications/unsubscribe-auth/ABjMQFn0jU4E4SXkRk-qnS7YCARmTNw-ks5r15e1gaJpZM4Mx969 .
Hey,
You will be happy to hear that version 3.0 is now in beta release, it comes with the ability to set multiple filters, and to treat header filters and programmatic filters seperatly
Head over to http://olifolkerd.github.io/tabulator/news/ to see the latest features!
Cheers
Oli
I have a table with a number of columns, most of them have their column filter option enabled. I also have a more complex custom filter implementing finer conditions that cannot be simply done through 'like' (one criterion is a superset of another : "BSCS" contains "CS").
Here is the issue. They reset each other:
having "col1 like x" and "col2 like y" works very well. If you remove the condition on col2, the filter on col1 is still honoured.
if you now also remove col1 filter, the clearfilter is executed and there no more filtering conditions. Even if the custom filter itself has not been 'cleared'.
Conversely, when I clear my own custom filter, I also disable the column filters - although the filter criteria are still seen.
The only way I see it is to extend tabulator in some way to implement the AND of all registered filters. i.e. Instead of managing filter expressions, stringing filters (e.g. as servlets do for instance).
Any idea, guidance?