【发布时间】:2017-11-17 23:07:20
【问题描述】:
我是 Sencha 的新手,我的问题如下:
通过在组合框中调用商店“媒体”:
xtype: 'combobox',
itemId: 'mediaPicker',
store: Ext.create('web.store.Media'),
fieldLabel: 'Image',
emptyText: 'Choose an Image'
我收到了预期的媒体列表,但是,根据商店模型中的以下属性,我如何才能收到仅包含图像的列表:
{
name: 'type',
type: 'int'
},
其中 type == 1 用于图像。
谢谢。
【问题讨论】:
-
请分享一个小提琴和你的 ExtJs 版本。您需要通过使用组合框或直接在商店中将过滤器传递给商店 - 您可能需要查看商店的 filterBy 函数。
标签: extjs combobox model store