Reputation: 31
I'm using Dandelion DataTable component in version 1.1.0, Thymeleaf and Spring MVC
I can filter the table with number of data and i can use the pagination.
I've problem with this scenario :
Here is the part of my code :
<table id="table_result" class="table table-striped table-bordered table-hover table-responsive" dt:table="true" dt:url="@{/accor/orders/search}"
dt:sortable="true" dt:pagingType="full_numbers"
dt:lengthMenu="'10,25,50,100'" dt:pageable="true" dt:info="true" dt:dom="lpirt" dt:theme="bootstrap2" dt:serverside="true" dt:processing="true"
dt:ajaxParams="getExtraParams" dt:autowidth="false" dt:filterSelector="#filterButton">
How can i save the state of DataTable ?
Upvotes: 2
Views: 476
Reputation: 745
Just add the attribute <table ... dt:statesave="true">
and it will store in your local storage the current state.
No need to write custom callbacks ;)
Upvotes: 0
Reputation: 1554
Add StateSave
and StateLoad
callback for this behavior.
There are examples in the official documentation.
Upvotes: 0