SearchBuilder predefined searches and stateSave=true
SearchBuilder predefined searches and stateSave=true
![jpu](https://secure.gravatar.com/avatar/717dee4e0d9e7abea20e2ded76efb54a/?default=https%3A%2F%2Fvanillicon.com%2F717dee4e0d9e7abea20e2ded76efb54a_200.png&rating=g&size=120)
When configuring a page with a predefined Searchbuilder search and the Datatable option stateSave=true I experience inadequate behavior in a sense that the predefined search is executed but the stored search is shown. Following test scenario:
- first time page load => predefined search is executed and the predefined search condition is shown on the page
- delete the predefined search condition and add an own SearchBuilder condition => new search condition is executed and shown with correct search condition
- leave the page and then re-enter the page
- Now the predefined search is executed but the search condition that is shown is the one stored in the state (from step 2)
In this situation the shown results do not match with the shown searchbuilder condition.
I do have the Datatable (server-side) option search.return
set to 'true'. I would expect that:
- if search.return
==true, the predefined search is executed , the stored condition is shown but not yet executed. The stored condition is only executed after triggering the search again.
- if search.return
==false, then I would expect the last loaded condition to be executed and shown. It is unclear to me in which order the predefined search and the stored search are loaded and shown by the extension.