0

Here is an example of what I'm trying to do with Sencha Ext JS 6.5.2 Modern: https://fiddle.sencha.com/#view/editor&fiddle/2b2i

I am trying to use an ArrayStore to load some values into the combobox. When I click on the drop down arrow, or search, I get an error stating that:

Cannot read property 'getFilters' of null

The problems seems that it is not loading the data correctly, and 'me.getStore()' returns null.

Am I not using the 'store' properly?

Sam
  • 185
  • 1
  • 3
  • 14

2 Answers2

2

After some digging into the API and trying to find numerous examples across the web, I believe I figured it out.

  1. I was setting the 'store' key as a string. slap head, instead of a config object. I changed that from:store: 'states' to store: { type: 'states' }

  2. I also had the wrong field specified in the model: displayAS vs displayAs.

once I did this, everything worked as expected.

Sam
  • 185
  • 1
  • 3
  • 14
0
  • Please check the docs to find that ExtJS stores have no alias config. You may want to change your store identification from alias to storeId.
  • Also, check the store config of the combobox to find that ExtJS takes "either a Store instance, configuration object or store ID", but does not instantiate a new store by alias.
    So you have to instantiate a new states store instance before your combobox is rendered. For the instantiation of stores of which only one instance should exist throughout the app, I can recommend adding them to the stores config of the Application.
Alexander
  • 19,906
  • 19
  • 75
  • 162
  • I was about to reply to my own question. 'alias' is allowed in the store config. The 'Setup' page under "Guides' for 6.5.2 uses it. I actually solved the issue. The issue was in fact, the 2nd bullet point. – Sam Dec 15 '17 at 22:45