State save on custom filter

State save on custom filter

jtoler5jtoler5 Posts: 88Questions: 32Answers: 3

I know I need to use the stateSaveParams and stateLoadParams options to make my select dropdown stay on refresh. But what I don't fully understand is how this could be used if we wrote a custom extension that extends off the button collection to create a custom dropdown? Is there any example of this?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586
    Answer ✓

    stateSave gives you a placeholder to store your custom information alongside DataTables's state - you can store whatever you like in there. If you create a custom dropdown, you would just need to restore that however suits, from the saved data.

    This thread here for example shows how to restore input element text. It really is just specific to the information you want restored.

    Colin

Sign In or Register to comment.