How to remove stateRestore UPDATE button
How to remove stateRestore UPDATE button
trongart
Posts: 222Questions: 51Answers: 0
I can see here that it is possible to set the following to false within the stateRestore config:
create: false
remove: false
save: false
rename: false
But there is no update: false
How can I remove only the UPDATE button so that only RENAME and DELETE buttons remain when a user interacts with a saved state (also creation of new states remains)?
Answers
It looks like the Update button doesn't appear in this test case:
http://live.datatables.net/yenijura/1/edit
I added the
createState
button so you can add a state. Thesave: false
is commented out. Create a new state if needed. Open the state and you will see the Update button. Uncommentsave: false
and re-run the example. Open the state and you won't see the Update button.The docs for
stateRestore.save
state this:Kevin
Kevin thank you very much for looking into this! I am using the alternative UI as in this test case. The goal is to not see the UPDATE button in the menu when you click on the arrow of any of the saved states.
save: false
does not remove it as far as I see. Only the Rename and Remove options should be there (as well as Create State in the main menu).Solved it as in this test case. It works with Ajax and does not display the Update button.
Correct test case: live.datatables.net/tibunevi/1/edit