Skip to content
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

Update PowerSelect API #61

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Update PowerSelect API #61

wants to merge 3 commits into from

Conversation

kpfefferle
Copy link

The recent changes to the ember-power-select types left out a number of options that are documented in the API reference: https://2-x.ember-power-select.com/docs/api-reference/

The recent changes to the ember-power-select types left out a number of options that are documented in the API reference: https://2-x.ember-power-select.com/docs/api-reference/
@bakerac4
Copy link
Member

bakerac4 commented Nov 9, 2022

Hi @kpfefferle - thanks for this. But many of these arguments no longer exist in the current codebase. 2.x is quite old - they are on 6.x now. I will go through and try to fix any I missed (or your welcome to do it using the code here! https://github.com/cibernox/ember-power-select/blob/master/addon/components/power-select.hbs ) but otherwise I would recommend taking these args and using Omit and/or Pick to create the exact args version you might need.

Another option that might be viable is to create a power-select/6.x folder and a power-select/2.x` folder - just would need to simmer on that a bit because it could get large quick.

Thoughts?

@kpfefferle
Copy link
Author

kpfefferle commented Nov 9, 2022

@bakerac4 That's a good catch. I ran into this because there are a number of arguments we use that are documented here but weren't included in the new types. These are probably arguments that you noted are "only accessed from the template"? We certainly use some of these and need them to be included.

I'll update my PR from the current docs instead of 2.x 🤦‍♂️

@kpfefferle
Copy link
Author

@bakerac4 I updated based on the current API documentation: https://ember-power-select.com/docs/api-reference

The only change was the addition of noMatchesMessageComponent argument.

@kpfefferle
Copy link
Author

@bakerac4

many of these arguments no longer exist in the current codebase

I'm not sure where you're getting this idea from. I just searched for every one of these arguments, and they all exist in the current codebase 🤔

@bakerac4
Copy link
Member

bakerac4 commented Nov 9, 2022

@bakerac4

many of these arguments no longer exist in the current codebase

I'm not sure where you're getting this idea from. I just searched for every one of these arguments, and they all exist in the current codebase 🤔

Taking a look. animationEnabled is not in power-select anymore - just in power-select-multiple and class is not an arg that can be passed in. It seems maybe I just picked the first few and didn't continue checking. Removing those (but adding animationEnabled to power-select-multiple args should be correct?

@kpfefferle
Copy link
Author

@bakerac4 Seems reasonable. Done ✅

@mike-engel
Copy link

Any updates on this? We're tying to set up glint in our addon, and there are a lot of errors with ember-power-select which this will hopefully solve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants