SearchPane save selected search on rebuild pane

SearchPane save selected search on rebuild pane

roei3000broei3000b Posts: 7Questions: 2Answers: 0
edited March 2020 in Free community support

Hello,

1) I use SearchPane and I need to reload data from ajax and rebuild pane every 10 seconds.
When table reloaded, all the selected filter reset, how could i keep them?
example:
http://live.datatables.net/yanakuqi/2/edit

2) I use SearchPane with button, how could i add OK button to the opened SearchPane window?

Answers

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

    I don't think 1 is easily possible. I tried using stateSave on the individual panes without success.

    Likewise 2, I'm not sure. I'll ask around the team and get them to report back.

    Colin

  • roei3000broei3000b Posts: 7Questions: 2Answers: 0
    1. I think that if ajax.reload will call to stateLoadCallback it going to work.
  • roei3000broei3000b Posts: 7Questions: 2Answers: 0

    about 2: I see in this thread: https://datatables.net/forums/discussion/60343/searchpane-dialog-with-close-button
    option to add close button/OK button but this not works for me, could you add livedemo for this?

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @roei3000b ,

    Something like this example for your second point?

    Thanks,
    Sandy

  • roei3000broei3000b Posts: 7Questions: 2Answers: 0

    Hi @sandy , exactly!
    It didn't worked for me because I use the production code and not the nightly code of SearchPane, but when I use the nightly code I get the annoying thing that every time I reload data from ajax the searchpane filters cleared.

    @colin, do you have any update about my first question?
    thanks!

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

    Sandy is intending on looking at it today - he only works part-time and today is his 'in' day!

    Colin

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @roei3000b ,

    I've been taking a look at your first issue today and while I have made some progress there are still a couple of bugs floating around that I will need to come back to.

    For the most part it is working if searchPanes.cascadePanes is disabled, although as mentioned there may still be a few outlying issues. I'll post back here when I have another update for you, in the mean time if you wish you can access progress so far from the nightly builds. See a couple of changes to your example here.

    Thanks,
    Sandy

  • roei3000broei3000b Posts: 7Questions: 2Answers: 0

    Hey,
    Thank you very much! it works for me :)

    I realize that I not need use the stateSave but use the update code from the nightly builds.
    When could you update the downloaded code?
    Because currently it's not work proper with the reload table - when the tabled uploaded, it not update the filtered table.

  • allanallan Posts: 63,208Questions: 1Answers: 10,415 Site admin

    We are wrapping up a few things for the next release of SearchPanes. When that is done it will be available on the download builder page. until then, you can use the nightly.

    Allan

This discussion has been closed.