rowData not defined with custom search pane and cascade

rowData not defined with custom search pane and cascade

Pete44Pete44 Posts: 22Questions: 7Answers: 0

http://live.datatables.net/nofivida/2/edit

The last defined search pane is a custom pane. If I select rows on the custom pane and other panes are empty, the pane crashes on deselection and a rowData is not defined error occurs.

To reproduce: Click on the right pane on "Winters", after that on "Joyce" and try to deselect both. Deselection of "Winters" is not possible and the error occurs. Only with the "clear all" button it works again after that.

Does anybody knows what I'm doing wrong?

This question has accepted answers - jump to:

Answers

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

    Hi @Pete44,

    Something isn't right there. I've raised an issue internally (DD-1614 for my reference) and will report back here when there is an update.

    In the mean time, take a look at these changes to your example. The only difference is returning true if the rowData is undefined, this seems to work as a work around for now.

    Thanks,
    Sandy

  • Pete44Pete44 Posts: 22Questions: 7Answers: 0

    Hey @sandy,

    as usual, thanks a lot for your great support! I added the undefined check and it works fine now. Thank you. :)

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

    Hi @Pete44 ,

    Not at all glad we could help.

    That should be the issue fixed now and you should be able to remove the undefined check. 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. You'll want to make sure that you are using the latest version of this.

    It's also worth noting that searchPanes.cascadePanes was designed around or logic. So you will notice a small change in how SearchPanes rebuilds the panes after the deselection for your above test. With or logic all of the options should be displayed where with and in this particular case only the selected one is. This is down to the data that is present in the table and the pane logic being used in the pane. In other cases it may work perfectly well.

    Anyway, I hope this helps.

    Thanks,
    Sandy

  • Pete44Pete44 Posts: 22Questions: 7Answers: 0

    Hi @sandy,

    thanks a lot for your very well pointed explanation. This is very helpful for me to understand further processes or connection between components.

    I replaced my current searchpanes version with your provided nightly build. On the first look everything looks fine and yes, it works without the workaround now.

    And yes, on deselection on some cases the pane is rebuild obviously. Thanks for the information that this is related to my used and option. But this is no problem because it absolutely makes sense and it's not a problem for usability.

    I noticed also that the nightly build fixes a bug with the missing translated phrase on empty panes. Awesome!

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @Pete44 ,

    Yeah, the nightly build has quite a few bug fixes in there at the moment. Hopefully we will manage to get a release done soon, we are just waiting for one or two more bugs to be solved and tested.

    Thanks,
    Sandy

This discussion has been closed.