Cascasepane true shows multiple count in filter change function
Cascasepane true shows multiple count in filter change function
valredr
Posts: 21Questions: 7Answers: 0
in SearchPanes
Hi,
i have used search pane and then switched on the cascade pane option but if i select values from the pane the filter change function executes twice.
find below test case.
This question has an accepted answers - jump to answer
Answers
Can you repost, please, the test case is missing,
Colin
@colin Apologies please find below the test case
http://live.datatables.net/kowapasi/15/edit
Yep, I'm seeing that in this cut-down example here. I've raised it internally (DD-2120 for my reference) and we'll report back here when there's an update.
Cheers,
Colin
Hi @valredr ,
I've made a change to try and reduce the number of calls to
searchPanes.filterChanged
. Unfortunately this is hard to reduce further givensearchPanes.cascadePanes
complex functionality - there's a lot of moving parts and edge cases that need to be covered!This will be available in the next SearchPanes release which we hope will be in the next few weeks. Until then you can access the fix from the nightly builds.
Thanks,
Sandy
Take a look at this example with the updated nightly build.
Thanks,
Sandy
Hi @valredr ,
Another way to reduce the number of times the code in that function runs would be to put a throttle function within it.
Thanks,
Sandy
@sandy Can you please share an example of how to implement the throttle function in this case
Hi @valredr ,
Sure take a look at this example. The docs for the throttle function can be found at
$.fn.dataTable.util.throttle()
.Hope this helps,
Sandy
@sandy Thanks you very much this was quite helpful