State Persistence does not store filters

Hello,

I've enabled state persistence for a grid with

[enablePersistence]="true"

but the info regarding filters applied is not stored. Just this info is stored for filters:


I've tried to do manual store and restore state for the grid, and the first time the component is loaded all works fine, but if I move to other page and return, always get this error in console:


This is the code to restore persistence in ngOnInit:

if (persistInfo) {
this.tasksListGrid.setProperties(persistInfo);
this.tasksListGrid.refresh();
}


Angular version 12.2.9 and Syncfusion Grid 19.3.44.

Thank you for your support.

Jose


EDIT: The error for querySelector only appears when I assign a value to filterSettings in the ngOnInit, like this:

this.filterOptions = { type: 'Excel' };

If I remove this line, the manual persistence works fine.



3 Replies

PG Praveenkumar Gajendiran Syncfusion Team October 14, 2021 12:19 PM UTC

Hi Jose, 
Greetings from Syncfusion support.

Based on your query and provided information, we have prepared a Grid sample with enablePersistence property and checked your reported issue in the angular 12 with Grid 19.3.44 sample, but we were not able to reproduce the reported issue at our end. For your convenience we have shared the screenshot and sample for your reference, Please find it in below.

Sample: https://www.syncfusion.com/downloads/support/forum/169622/ze/my-app2020026179.zip

Screenshot: 
   



Still if you have facing the issue, please share us the below information that will be helpful to validate further on this,
 
  1. Complete grid rendering code.
  2. Let us know the replication procedure for reproducing the problem with Video demonstration to understand it better.
  3. If possible share us a simple sample to replicate the problem or try reproducing it in the above provided sample. It would be helpful to identify your problem case better so that we can check and provide the solution based on that
  4. Please elaborate on your reported issue.

Please get back to us with the requested details which will be helpful for us to validate the reported scenario at our end and provide the solution as early as possible 

Regards 
Praveenkumar G 



JL Jose Luis Garcia replied to Praveenkumar Gajendiran October 18, 2021 08:37 AM UTC

Hi Praveenkumar,


I'm not sure why, but after updating to the latest version of Syncfusion (19.3.45) and Angular (12.2.10), without any change to code, persistence filtering is working like a charm.


Thank you very much

Jose



PG Praveenkumar Gajendiran Syncfusion Team October 19, 2021 11:19 AM UTC

Hi Jose, 

Thanks for your update. We glad that your requirement is resolved at your end. 

Please get back to us if you need further assistance. 

Regards, 
Praveenkumar G 


Loader.
Up arrow icon