我正在使用一个名为 ember-power-select 的插件。
Github: https: //github.com/cibernox/ember-power-select
用于搜索的文档:https ://ember-power-select.com/docs/the-search
多项选择的文档:https ://ember-power-select.com/docs/multiple-selection/
问题:如何使用nameor进行搜索email
/template.hbs
<PowerSelectMultiple
@searchEnabled={{true}}
@options={{this.authors}}
@selected={{this.author}}
@searchField="email"
@placeholder="Select some names..."
@onChange={{fn (mut this.author)}} as |author|>
{{name}}
</PowerSelectMultiple>
Run Code Online (Sandbox Code Playgroud)
/controller.js
authors = [
{ name: 'Foo', email: 'foo@gmail.com' },
{ name: 'Bar', email: 'bar@gmail.com'},
{ name: 'Baz' email: 'baz@gmai.com'}
]
Run Code Online (Sandbox Code Playgroud)