Saving state of custom filters, with AJAX data source

Saving state of custom filters, with AJAX data source

PaulKodePaulKode Posts: 2Questions: 1Answers: 0

My table is using an AJAX datasource, and is passing through additional data, coming from some custom filters (date picker, select dropdown etc).

By default, stateSave is just storing column ordering, search text and pagination etc.

How can I add my custom filter values to the saved state and use them on subsequent page loads?

Answers

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

    Hi @PaulKode ,

    You can set your own state save values, or add to the defaults, with the stateSaveParams, and then read them back with stateLoadParams. This example here should also help, it's doing just that for the Select extension - ensuring there's the same selection on page reload.

    Cheers,

    Colin

  • PaulKodePaulKode Posts: 2Questions: 1Answers: 0
    edited December 2018

    How can I tell the table to reload the AJAX request, using the loaded saved state?

    EDIT - nevermind, seems to work automagically :)

This discussion has been closed.