Get currently applied filters on SearchPanes
Get currently applied filters on SearchPanes
hrast
Posts: 17Questions: 5Answers: 0
Hello guys,
I'm currently using SearchPanes in production and it is awesome! Great job, really!
I just have one question. Is there any way possible to get list of currently applied filters on SearchPanes?
I am rendering a graph from filtered table values so it would help me a lot.
Thanks in advance!
This question has accepted answers - jump to:
This discussion has been closed.
Answers
Hi @hrast ,
Glad you are finding it useful!
The SearchPanes themselves are DataTables so you can iterate over them like this and extract the rows as in the example.
Hope this helps,
Sandy
Thank you @sandy, that solves my problem! Many thanks!
Hey @sandy,
How can I get list of active filters if searchPanes are opened by button?
Example: live.datatables.net/baxinelu/7/edit
Thanks in advance!
Hi @hrast ,
Something like this will do the trick. If you are using multiple buttons then you will need to add a class or an id to the SearchPanes button to only click that one.
Hope this helps,
Sandy
Hey @sandy,
I was trying to adjust your code so that it console logs the filter values whenever you click on a field in the search panes. I kind of got it working but every time I click it shows me the previous state, missing the current value that I clicked.
this is what I added
all the values within the search panes have a class name of dtsp-name.
Hello, Thank you for this awesome software. I was actually trying to implement something similar to this question and couldn't get it to to work.
How can I get the filtered search pane results as I click on values within the panes. Rather than what was clicked, I want to get the results as I click on the options within the search panes.
@tableguy101 We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin