stateRestore Ajax function - UPDATE

stateRestore Ajax function - UPDATE

trongarttrongart Posts: 222Questions: 51Answers: 0
edited July 2022 in Free community support

In this example, I can see that the ajax function supports

data.action === 'load'
data.action === 'rename'
data.action === 'remove'
data.action === 'save'

What is the name of the action when the user updates a state?
data.action === 'update' does not work.

If this does not exist, how can I run data.action === 'save' when user updates a state?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,276Questions: 26Answers: 4,765
    Answer ✓

    I used the debugger on that example and, when performing an update, the data.action is save:

    Does this answer your question?

    Kevin

  • trongarttrongart Posts: 222Questions: 51Answers: 0

    Thank you! Strangely data.action === 'save' only activates when a new state is created, but not updated for me.

  • kthorngrenkthorngren Posts: 20,276Questions: 26Answers: 4,765
    edited July 2022

    Have you tried a browser breakpoint like I did to see what happens and to see the values of data?

    Can you provide a link to your page or a test case replicating the issue so we can take a look?
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

Sign In or Register to comment.