SearchPanes cascadePanes doesn't work with nightly build

SearchPanes cascadePanes doesn't work with nightly build

pgerundtpgerundt Posts: 90Questions: 13Answers: 2

Hi, I'm back.
The nightly build of SearchPanes is wonderful (saving state), but suddenly cascadePanes doesn't work anymore:

Link to test case:
http://live.datatables.net/fopuyupo/20/edit

Greetings,
pgerundt

Replies

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @pgerundt ,

    Thanks for pointing this out. I think this is actual=ly going to be related to a bug that we already have open (DD-2440 for my reference). I'm going to take a look at it today and will report back here with my findings.

    Thanks,
    Sandy

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @pgerundt ,

    Thanks again 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

    Dear @sandy,

    With the latest build, I encounter a new error. It's hard to setup a test case based on your example.

    If you have an extra column defined under columns with searchPanes.show set to false, an error occurs in SearchPanesST.prototype._serverTotals().

    That is because the variable colTitle is set to the name of this additional column, but
    this.s.serverData.searchPanes.options[colTitle] is not defined.

    So I guess there should be a check pane.s.colOpts.show == true before accessing this.s.serverData.searchPanes.options[colTitle].

    Does this help?

    Greetings,

    pgerundt

  • pgerundtpgerundt Posts: 90Questions: 13Answers: 2

    I finally managed to setup a test case:
    http://live.datatables.net/toqoqafe/2/

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Thanks for the test case. Sandy will take a look when he's next in the office, probably towards the end of next week.

    Colin

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @pgerundt ,

    I think you may have linked to the wrong test case there(?) so I can't see the issue. The fix you have suggested sounds sensible though so I've implemented it. If you could let me know if that fixes the issue and give me a link to the test case showing the issue then that would be great thanks!

    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,

    I just checked the nightly build and everything seems to be fine now. Thank you very much.

    pgerundt

  • pgerundtpgerundt Posts: 90Questions: 13Answers: 2

    Hi @sandy & @colin,

    the nightly build seems to be broken again.
    When using the dom option P and setting cascadePanes to true, the panes state is no longer stored.

    Here is an example:
    http://live.datatables.net/ruhuguwu/95/edit

    Your example from above
    http://live.datatables.net/toqoqafe/4/edit
    with stateSave added also stopped working.

    Another thing when using cascadePanes to true: Sometimes (and I cannot reproduce it) you can't click the pane clearButton when a filter is selected.

    pgerundt

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Thanks for the text cases. Sandy will be in on Thursday, he'll take a look then,

    Colin

  • 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,

    took me a while, but I finally found the reason for the clearButton not working:

    There is a bug with SearchPanes for Bootstrap4 - but only when using the Buttons extension.

    Here is the test case:
    http://live.datatables.net/ruhuguwu/108/edit

    If you select a pane entry, you cannot click the clear button.
    After page reload, the clear button works again - but only for saved pane selections.
    If you select a new pane entry, the button doesn't work until page reloaded.

    Possible cause:
    Without Bootstrap4, the clear button has the css classes dtsp-paneButton and clearButton.
    If you add the BS4 extension of SearchPanes, the classes get set to btn btn-light clearButton - please note the missing dtsp-paneButton.

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Thanks for the test case. We'll take a look and report back next week, probably towards the weekend.

    Colin

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @pgerundt ,

    I think something funny has gone on with the states over your many iterations with that page! An error is being thrown when the code is run. If you load this page and run

    localStorage.clear()
    

    before you start then it should work ok.

    Thanks,
    Sandy

  • pgerundtpgerundt Posts: 90Questions: 13Answers: 2

    Dear @sandy,

    I'm sorry, but the local storage is not the problem.
    - open this page (stateSave is disabled)
    - click on the "SearchPanes" button
    - select a filter
    - click on the delete button of the pane <- won't work
    - perform a search in the pane or reload the page
    - click on the delete button of the pane <- works

    Thanks,
    Pascal

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Yep, I'm seeing that too, thanks for reporting. It appears to be doing the same regardless of whether SearchPanes is a button or in the table. I've raised it internally (DD-2481 for my reference) and we'll report back here when there's an update.

    Cheers,

    Colin

  • pgerundtpgerundt Posts: 90Questions: 13Answers: 2

    Thanks @colin,

    but it works fine with SearchPanes in the table (dom: Pt).

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Hmm I think I have to agree with you, I was sure I saw it on "Pt" this morning but I can't reproduce it now - maybe the coffee hadn't kicked in...

    Colin

  • pgerundtpgerundt Posts: 90Questions: 13Answers: 2

    Dear @colin,

    any news on this task?
    Asking for a friend...

    Cheers,
    Pascal

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @pgerundt ,

    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 as a charm.

    Thanks,
    Pascal

Sign In or Register to comment.