We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I have an issue when selected is a promise when trying to clear the select.
selected
Here is a minimal reproduction (base on master) :
<PowerSelect @selected={{this.selected}} @onChange={{this.change}} @options={{this.cities}} @allowClear={{true}} as |city|> {{city}} </PowerSelect>
https://github.com/romgere/ember-power-select/blob/asyn_issue/tests/dummy/app/templates/playground.hbs
cities = ['Barcelona', 'London', 'New York', 'Porto', 'Coruña', 'Kracow', 'Siena', 'Portland', 'Springfield', 'Tokio'] @tracked _selected = undefined get selected() { let s = this._selected === undefined ? resolve(this.cities[2]) : this._selected return s } set selected(v) { this._selected = v } @action change(v) { this.selected = v }
https://github.com/romgere/ember-power-select/blob/asyn_issue/tests/dummy/app/controllers/playground.js
& here is the behavior when trying to clear the select (with clear button, or by settings the value to null "externaly") : Select is not updated.
I didn't try, but I'm 100% sure it was working on previous power-select version
The text was updated successfully, but these errors were encountered:
I'm facing the same issue. Here is the version used: "ember-power-select": "~6.0.1",
Sorry, something went wrong.
🆙 me2 Resolved it temporarily by resetting the value via return this.selectedValue ?? Promise.resolve()
return this.selectedValue ?? Promise.resolve()
Successfully merging a pull request may close this issue.
Hi, I have an issue when
selected
is a promise when trying to clear the select.Here is a minimal reproduction (base on master) :
https://github.com/romgere/ember-power-select/blob/asyn_issue/tests/dummy/app/templates/playground.hbs
https://github.com/romgere/ember-power-select/blob/asyn_issue/tests/dummy/app/controllers/playground.js
& here is the behavior when trying to clear the select (with clear button, or by settings the value to null "externaly") :
Select is not updated.
I didn't try, but I'm 100% sure it was working on previous power-select version
The text was updated successfully, but these errors were encountered: