Our blazing fast Grid component built with pure JavaScript


Post by pkuehne_sharesuite »

Hi,

I want to reapply the filter state of the store after the page/grid has been reloaded.
I've implemented the StateProvider and the filter is also saved in the localStorage object, saved by the StateProvider.

this.stateProvider = new StateProvider({
            storage: 'local',
            prefix: 'state-'
        })
<bryntum-grid
	...
    	[stateProvider]="stateProvider"
    	...
</bryntum-grid>
 

But the filters are not reapplied after the reload the filters into the store?

Is there anything to configure for the state to load the filters?


Post by alex.l »

Hi pkuehne_sharesuite,

I am not sure I follow what exactly happens here:

But the filters are not reapplied after the reload the filters into the store?

What is "reload the filters"?

Please try to filter grid here and reload the page https://bryntum.com/examples/grid/state/
Do you see the problem you described?

All the best,
Alex


Post by pkuehne_sharesuite »

See attached image of the stored state.

The sorters of the store are applied to the store on reload, but the filters are not.

The store in your example looks exactly the same and also the filters are applied.

Greetings,

Phil

Attachments
Bildschirmfoto von 2022-08-15 13-38-39.png
Bildschirmfoto von 2022-08-15 13-38-39.png (37.08 KiB) Viewed 580 times

Post by marcio »

Hi Phil,

Could you please share your code here?? If you zip your project and send it to us to analyze the code would be a lot easier to understand what could be causing this, because as you checked the demo works correctly, so we need to see the code to identify the cause of the unexpected behavior.

Best regards,
Márcio


Post by Animal »

That state looks invalid. How was it created? Filters do not look like { responsibleId : "", createdBy : "" } etc.

They look like { property : "fieldName", operator : "=", value : "test" }


Post by pkuehne_sharesuite »

Thanks Animal.

This seems like what was causing the issue.


Post Reply