如何在ExtJS MultiSelector搜索框中预选项目

时间:2017-11-07 16:55:52

标签: javascript extjs extjs6

有没有办法操纵MultiSelector Search组件预选一些项目?

相关链接:

MultiSelector KitchenSink example
MultiSelector Docs Sencha page {
{3}}

1 个答案:

答案 0 :(得分:0)

通过在Afterrender上选择MultiSelectorSearch组件中的记录来解决:

search: {
    ...
    listeners:
    {
        afterrender: function(cpt)
        {
             // existing items store is sent through the MultiSelector config
             cpt.selectRecords(me.getExistingStore().getData());
         }
    }
}