I'm trying to close the select box before it executes the search with Ember Power Select. I'm assuming the user knows what he is looking for if he paste a list and automatically sets the selected items.
I tried to use select.actions.close()
but it seems that it is related to the onClose() event. I also try to use the property opened
but changing it did not show any difference.
My component
{{#power-select-multiple
renderInPlace=true
search=(action "mySearch")
selected=selected_item
onchange=(action (mut selected_item))
oninput=(action "checkPastingMultipleElements")
opened=checkSelect
as |name|
}}
{{name}}
{{/power-select-multiple}}
my action
checkPastingMultipleElements(text, select) {
this.set('selecteded_item', [text]);
// error
// select.actions.close()
// does nothing
// if (text.length === 4) { this.set('checkSelect', false); }
return false; // if true, it executes the search
}