I am a fairly new Ext JS and am trying to insert MultiSelect inside Panel .
ViewModel has a stores property, as you can see here:
Ext.define('TEST.view.controls.search.SearchFilterModel', { extend: 'Ext.app.ViewModel', alias: 'viewmodel.filter', data: { title: '' }, stores: { test: { fields: [ 'id', 'name' ], proxy: { type: 'ajax', url: 'api/test', reader: 'array' }, autoLoad: true } } });
I would like to link this in my View as follows:
viewModel: { type: 'filter' }, layout: 'fit', border: 1, plain: true, scrollable: 'y', layout: 'fit', bind: { title: '{title}', }, items: { xtype: 'multiselect', scrollable: false, allowBlank: true, ddReorder: true, bind: { store: '{test}' }, valueField: 'id', displayField: 'name' }
In this case, the store ends as null , although the data is not loaded into the widget. Instead of linking the repository, though, if I just hardcode it in the view, then it works.
Does anyone see what the problem is?