Closed lvmajor closed 4 years ago
Hi @os1r1s110 ,
Thanks for the PR. There have been a lot of changes to SearchPanes since you made this PR (we've been busy!), apologies for that. There is often a constant stream of bugs coming in from the forum that we tend to address first. Take a look at the following example. It shows the clear pane button working after an ajax reload.
There have also been a lot of improvements to make sure that there are a minimal amount of event listeners being called, we've solved these with a slightly different approach to that which you have taken above.
I'm going to close this off based on the above.
Thanks, Sandy
When using
searchPanes
andtable.ajax.reload()
, the "clear pane" buttons available on each pane if theclear
option is set totrue
, stops working as the event listeners are only set the first time the pane is displayed. This fix makes sure to reset the flag when rebuilding the pane so that the event listeners are re-attached as expected. (it's a one-liner fix at line 332)The other changes are not mandatory, it's just to make sure there's no event listeners that are added twice or more as this was causing memory leaks and performance degradation in previous versions.