SearchPanes error with nested tables, dom 'B' option and cascadePanes and/or viewTotal

SearchPanes error with nested tables, dom 'B' option and cascadePanes and/or viewTotal

pgerundtpgerundt Posts: 90Questions: 13Answers: 2

Hi guys!

We found another (crazy) bug:
If you are using nested datatables with the dom P option, everything works fine.
When switching to dom B option and using cascadePanes and/or viewTotal, a JS error is thrown.

Here is the test case:
http://live.datatables.net/laqowoma/15/edit

The error occurs because the child table tries to add options to the search panes, but it addresses the search panes of the parent (!) table. If the column names from parent and child differ, the panes cannot be found.

You can cross-check with this test case:
http://live.datatables.net/laqowoma/17/edit
Here the column names of parent and child table are identical, the error does not occur.

This question has an accepted answers - jump to answer

Answers

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @pgerundt ,

    Thanks for pointing this out. That should be the issue fixed now as you can see at this example. 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

  • pgerundtpgerundt Posts: 90Questions: 13Answers: 2

    Hi @sandy,

    thanks a lot. Works perfect. I would recommend to add another two if in

    line 2309:

                                    if (pane.s.dtPane) {
                                        pane.s.dtPane.order(loadedPane.order);
                                    }
    

    line 2962:

                                    if (pane.s.dtPane) {
                                        // Set the value of the order
                                        pane.s.dtPane.order(loadedPane.order);
                                    }
    

    Greetings,
    Pascal

  • sandysandy Posts: 913Questions: 0Answers: 236
    Answer ✓

    Hi @pgerundt ,

    Thanks for pointing those out. I've not made those exact changes, but something very similar. 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

  • pgerundtpgerundt Posts: 90Questions: 13Answers: 2

    Hi @sandy,

    thanks for that. Looks good and works fine.

    Pascal

Sign In or Register to comment.