Extjs How to stop the reboot of the store

I am building an application using the Ext Js MVC approach.

I have a couple of combos in different views tied to one store. The store is configured to query: remote and autoLoad: false and downloads its data from the server.

The problem every time I change the view (the old view is destroyed) and expands the combo, the store reloads its data. Is there a way to get the store to load its data only once? When the store is once loaded, it will not restart it again, even the associated combo will be destroyed.

+4
source share
1 answer

There are ways to do this in combobox itself, but I think the easiest way for you is to sign up for a download event in the store and check if the repository contains entries if it stops loading.

store.on('beforeload', function(s){ return !s.count() > 0; }); 
+6
source

All Articles