cancel
Showing results for 
Search instead for 
Did you mean: 

How to reset to default filters after refreshing the page.

Developer103
7 - Data Storage
7 - Data Storage

Hi , I am working on dashboard and I want the filters in dashboard to set to default filters if user reloads the application or do browser refresh, is there any way that I can achieve this.

3 REPLIES 3

harikm007
13 - Data Warehouse
13 - Data Warehouse

I tried this also btw, I am using embed SDK for SISENSE , in documentation they have suggested to pass persist flag value as false so the changes will not persist but this is not happening in my dahsboard even after passing the flag value as false.

francoisvv
9 - Travel Pro
9 - Travel Pro

You can try the following code by adding it as a custom script to your dashboard by clicking on the 3 dots on your dashboard, selecting EDIT SCIPT and adding the following code there.  Once added, just save and then refresh your dashboard.

dashboard.on('initialized', () => {
dashboard.filters.clear();
dashboard.filters.update([], {refresh:true, save:true});
console.log('filters deleted!');
});