ColumnControl won't keep state of search if two searches are present

ColumnControl won't keep state of search if two searches are present

oranavivoranaviv Posts: 1Questions: 1Answers: 0

Description of problem:
Hello guys,
my scenario is that I'm building a datatable with columncontrol (and much other extensions)
with this cc in the init stage:

columnControl: [
    {
        target: 0,
        content: [
            'order',
            ['orderAsc', 'orderDesc', 'orderAddAsc', 'orderAddDesc', 'orderRemove', 'orderClear', 'spacer', 'reorderLeft', 'reorderRight', 'spacer', 'search', 'searchList']
        ]
    },
    {
        target: 1,
        content: ['search'],
        className: 'dt-header-columnssearch'
    }
]

What I'm doing is hiding the second row and toggle it with a button (let's call that row - Quick Search)
and on the table header I did like a "Column Menu" with much stuff there.
now, one more thing is that -
when clicking on a datatable row it opens a modal dialog which has a callback.
on the callback I save a state using state restore extension then refreshing the page and loading the state i saved. let's call this action "Editing".

the problem is this.
1. When toggling the Quick Search and doing a search there, and then Editing, the state restored with the search and the table is filtered accordingly
2. When searching using the search in the column menu and then editing, it won't save the search nor will filter the table and it's like it resets the table

I need to fix that when using the search inside the Column Menu it will restore good after the refresh.

bonus question - is there a way to sync these searches inputs?

Thank you very much for the help in advance!

Sign In or Register to comment.