StateRestore and Deep Linking

StateRestore and Deep Linking

trongarttrongart Posts: 222Questions: 51Answers: 0
edited December 2021 in DataTables 1.10

I am trying to use the new StateRestore feature with deep linking as in this example. The stateRestore buttons need to be inside the $.fn.dataTable.Buttons so they can be a separate container. For some reason this does not seem to work.

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,324Questions: 26Answers: 4,949

    Looks like you have a couple errors in the browser's console. Try moving the buttons init code into the document.ready() function so it is in the same scope as the table variable. You have B in your dom option. Try removing that to eliminate the print button error.

    Kevin

  • trongarttrongart Posts: 222Questions: 51Answers: 0

    @kthorngren Apologies! Here is the revised test case - still with the same issue.

  • kthorngrenkthorngren Posts: 21,324Questions: 26Answers: 4,949
    Answer ✓

    Now you are getting this error:

    Uncaught TypeError: this.s.dt.button(...).collectionRebuild is not a function

    I didn't take time to troubleshoot the exact issue but there is something wrong with your .js and .css include statements. I used the Download Builder to generate the proper files. See the updated test case:
    http://live.datatables.net/qasagimu/2/edit

    Kevin

  • trongarttrongart Posts: 222Questions: 51Answers: 0

    Thanks so much! Will have a look into this.

Sign In or Register to comment.