Skip to content

Commit 3f1b4ae

Browse files
committed
Fixed loaded value from storage for column search.
Signed-off-by: Dmitry Mazurov <[email protected]>
1 parent 40899d4 commit 3f1b4ae

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/VdtnetTable.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,19 @@ export default {
426426
427427
if (!that.hideFooter && that.columnSearch) {
428428
that.options.initComplete = function () {
429-
this.api().columns().every(function () {
429+
let api = this.api();
430+
let state = api.state.loaded();
431+
432+
api.columns().every(function () {
430433
const that = this;
434+
const colIdx = this.index();
435+
436+
if(state){
437+
let colSearch = state.columns[colIdx].search;
438+
if (colSearch.search){
439+
jq('input', this.footer()).val(colSearch.search);
440+
}
441+
}
431442
432443
jq('input', this.footer()).on('keyup change clear search', function () {
433444
if (that.search() !== this.value) {

0 commit comments

Comments
 (0)