Closed DaveGahan closed 9 years ago
you need to modify your server side scripts to use the values from fcol and make the filters work server side.
there is no need for a jsfiddle for this.
Thanks a lot for the reply.
I did it but the problem is that using "filter_functions" together with "ajaxurl" does not make any select box appear. The field remains a classic input box, not a select box.
The only way to make it a select box is to set something like this into html th :
class="filter-select" data-placeholder="Select a name"
But it only populates the select box with current page values, so I really need to set up all possible values by myself using "filter_functions". And this function is not recognized.
Note that, despite above html entry works, this does not work neither :
filter_functions : {
'.first-name' : true
}
I hope I'm a bit clearer (sorry if it's not the case).
Hi @DaveGahan!
If you want a select to be populated by custom options, go ahead and add the "filter-select"
class to the header. Then use the filter_selectSource
option to add your more extensive list of options.
Hi Mottie and thank you for this great job.
I tried but it does not work.
I took example-pager-ajax.html and I modified these lines :
Firstable, note that init of tablesorter does not seem to complete :
Making any filter/sorter change will do the job but only with cells content :
Thanks a lot for your help.
#any
is an id, not a class...
Hey @thezoggy! That shouldn't matter, you can target a column using either a class or id.
I see the problem... because the table is empty, no parsers are set so the filter select code is trying to parse the values and getting a javascript error. I'll try to fix it soon.
Derp, yeah, I see the class should be used in the above case... I was making my own demo and found the error.
@thezoggy Sorry I made a mistake by using the wrong screenshot among many possibilities ;-)
@Mottie Thank you very much, I'll check it as soon as possible today. You were really fast, thanks a lot :-)
Problems solved ! \o/
Thanks a lot for help.
Hi, firstable thank you very much for this great job.
I use tablesorter together with pager and filters and it works great except rendering time becoming too slow due to growing amount of datas.
So I'm modifying it in order to make the job done by the server using ajaxurl.
It seems that filter_functions does not work together with ajax.
I took the ajax demo and I try to add a filter_functions clause but it seems to be ignored.
Do you have any idea ?
modified example-pager-ajax.html :