-
Notifications
You must be signed in to change notification settings - Fork 11
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
Allow Objects as Values For Select Component #44
base: main
Are you sure you want to change the base?
Conversation
Merging this would close #43 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a glance at the code and it's looking really really good. Would recommend going in and cleaning up the indentation as in github it looks like things are at different indentation levels. Could be an IDE difference.
That along with some documentation upgrades, and I'll clone things down locally just to double check stuff, but this looks great and should be mergable soon I imagine.
EDIT: By the way, CI will likely fail due to #42 but that won't block us from merging this PR, we'll just make note of what Ember versions are supported and address that issue separately.
import Component from '@glimmer/component'; | ||
|
||
|
||
export default class SelectLightOption extends Component { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love seeing this logic extracted to its own sub component, well done!
Updated whitespace in the effected files to match the standard Ember editorconfig (2 spaces). The test file had some existing mixed tabs and spaces. Will look at docs in the morning! |
This implements both #30 and #31.
For implementation this uses a yielded child component which also gives an upgrade path for users of
embers-select
(a mostly deprecated community component).There is a breaking change since this changes the order of arguments sent to
onChange
(#30) and sends the full object value of the selection option rather than the string attr value.