Add attribute to configure value property
See original GitHub issueSay I have an array like this:
[{id: 1, name: "name"}]
Now, the actual selected value, will be the id, but what I want to display is the name. So I wish I could use power-select like this:
{{#power-select keyField='id' options=options selected=selectedId onchange=(action (mut selectedId))}} as |option|}} {{option.name}} {{/power-select}}
To fix this, i currently have to make a custom computed property, that maps from the selected object to write the selected id internally, and return the selected object based on the selected id.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Element.setAttribute() - Web APIs | MDN
setAttribute () Sets the value of an attribute on the specified element. If the attribute already exists, the value is updated; otherwise a...
Read more >How to add an attribute to a property at runtime - Stack Overflow
This is "adding attribute to the PropertyDescriptor " extracted from type and has no sense unless you are trying to build a type...
Read more >Configuring Attributes | Apple Developer Documentation
With an entity selected, click Add Attribute at the bottom of the editor area. · In the Attributes list, double-click the newly added...
Read more >Python's property(): Add Managed Attributes to Your Classes
In this step-by-step tutorial, you'll learn how to create managed attributes, also known as properties, using Python's property() in your custom classes.
Read more >How to get, set, and remove attributes and properties with ...
Today, we're going to look at how to get, set, and remove attributes and properties with vanilla JS. We'll also learn the difference...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can
Note:
find-by
is a helper you can find in https://github.com/DockYard/ember-composable-helpersResolves issue #160