-
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
Use named blocks instead of displayKey #36
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -153,8 +153,9 @@ module('Integration | Component | select-light', function(hooks) { | |||||
<SelectLight | ||||||
@options={{this.options}} | ||||||
@value={{this.value}} | ||||||
@valueKey="val" | ||||||
@displayKey="description" /> | ||||||
@valueKey="val"> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test no longer passes in a It could then be good to add another test that uses a custom passed in |
||||||
<:option as |optionValue| >{{optionValue.description}}</:option> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With this new style, it seems more like we are yielding the entire option and not just the option value. So perhaps this is more appropriate.
Suggested change
|
||||||
</SelectLight> | ||||||
`); | ||||||
|
||||||
assert.dom('select option').hasAttribute('value', options[0].val); | ||||||
|
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.
Close! I think this could follow the following pattern rather than relying on the seemingly unrelated (but passing the test)
@valueKey
https://github.com/emberjs/ember.js/pull/19318/files#diff-08e773e2dfe82a277c4837362632f2e6d5d2d18137feaa80456e7d0537ff37d8R185