Issue with Searchpanes and ajax reload (when no pane already available)

Issue with Searchpanes and ajax reload (when no pane already available)

setwebmastersetwebmaster Posts: 78Questions: 5Answers: 0

Sometimes when reloading data with ajax, the searchpanes extension will crash and no panes will be generated.

The issue happens in the _updateCommon function when computing the scrollTop in specific scenario defined below:
1. Load a table with searchpanes and ajax data source.
2. Reload table with ajax where the resulting data would have a threshold lower than the option set in searchPanes (resulting in no pane being drawn). This could also be the case if there is no data returned at all I guess (hence generating an empty table).
3. Then reload the table with a data set that would cause searchpanes to be drawn
4. ==> There in the updateCommon function, it will crash as $(this.s.dtPane.table().node()).parent()[0] is undefined, so calling .scrolltop on it results in a crash.

I would like to provide a repro, but there is no different data sets for ajax sourced data on live.datatables.net... If required I will try to make something up but I think the problem description is pretty clear. Ping me if there's anything I can do to help!

Again, thanks in advance for your great work on this extension!

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599
    Answer ✓

    I'm not seeing that here - I'm using mockjax to fake the calls. This is using the nightly builds so it's possible it's one of the fixes @sandy has added recently. Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.

    Cheers,

    Colin

  • setwebmastersetwebmaster Posts: 78Questions: 5Answers: 0

    @colin I will try to reproduce with the nightly and report back here, thanks for your time

  • setwebmastersetwebmaster Posts: 78Questions: 5Answers: 0
    edited March 2020

    @colin it seems like it has effectively stopped happening with the nightly version. I will come back here if it ever happens again (as it seemded like an intermittent bug from the beginning but now I tried replicating after switching/merging changes from the latest nightly and it doesn't reproduce, so I'll consider it fixed for now :) )

    Thanks again for your time and have a great day!

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    You're welcome, glad all sorted.

This discussion has been closed.