Search code examples
extjsextjs4extjs4.1

Comboboxes with the same store but different filters


I have more comboboxes that you the same store, but that should use different filters of the store. How should I do that? Helpful would be, if the combobox would accept a storeFilter string property, but it doesn't.


Solution

  • If you have multiple comboboxes that need to display different data at the same time, you need to instantiate the store instance for each combobox separately. This way they are not going to interfere with each other. Simple use store: new Myapp.store.MyStore() .

    Alternatively you may want to have a Base store that autoloads the full data set and then use loadData method on the individual store instances to load the prefetched full data set and provide filter config .