sir-dunxalot / ember-chosen Goto Github PK
View Code? Open in Web Editor NEWEasy integration for Chosen v1.1.0 with Ember v1.5+
Easy integration for Chosen v1.1.0 with Ember v1.5+
Often my label
and value
are the same, thus it would be convenient pass a collection of strings to content
. Unfortunately doing so causes:
Uncaught Error: Assertion Failed: When using @each to observe the array SOME, STRINGS, HERE, the array must return an object
You get that regardless of whether you:
optionLabelPath
and optionValuePath
, or:optionLabelPath='content' optionValuePath='content'
.My current workaround is to wrap the content
array, thus:
stuffContent: function() {
return _.map(this.get('stuff'), function(o) {
return { name: o };
});
}.property('stuff')
So I can then use:
{{chosen content=stuff optionLabelPath='content.name' optionValuePath='content.name'}}
But that's a lot of work, when it could just be:
{{chosen content=stuff}}
I believe this is specific to ember-chosen (not chosen in general).
Further I'm not sure if it's unsupported, or just undocumented?
Hi,
I have a chosen select and a collection of models.
Content doesn't change, but the selection does.
IE:
chosen content=unchangingOptionList selection=model.selectedTags
btn click="prev"
| Prev
btn click="next"
| Next
Since content doesn't change, the wrong selection is rendered to users.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.