-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
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
allowClear not working in ember-power-select v4.1.0 #1423
Comments
Hi
Thanks again for a very useful component |
Interesting, thanks for reporting. Are you able to create a failing test for the bug? If so I think I can merge a fix next week. |
Hi
I have tried this as part of ember-data-test.js Hope this helps |
We run into the same issue. The fixed described also solves the problem we are having with clearing the value of the select component. Thank you @cibernox for looking into this. |
@cibernox I'm facing the same issue and could also fix it like @flynnawtc did. Thanks @flynnawtc for investigating! |
Related #1467 |
Hi
I am currently upgrading by application to Ember Octane/Glimmer components etc. and having upgraded ember-power-select to version 4.1.0, the allowClear functionality no longer appears to be working properly. My onUpdate action is correctly called, but the displayed value is not removed. Downgrading to version 3.0.6 resolves the issue for the short term, but is not a long term solution.
I believe that I have narrowed down the issue to the _updateSelected() method in power-select.ts where, if the previously selected value was Promise-like, then this._resolvedSelected is not cleared in line with the new (null) value of this.args.selected
I have a solution that works for me as follows:
instead of
but I am unclear whether or not this is a complete solution. I am wondering that if the updated value of this.args.selected is NOT a promise but the previous value was promise-like, then we could be leaking observers within this function.
Thank you @cibernox for all your work on this addon. It is much appreciated
Adrian
The text was updated successfully, but these errors were encountered: