21 lines
664 B
JavaScript
21 lines
664 B
JavaScript
// Generated by CoffeeScript 2.7.0
|
|
import Ember from 'ember';
|
|
|
|
export default Ember.Component.extend({
|
|
classNames: ['ui-multi-select-container'],
|
|
labelProperty: 'name',
|
|
placeholder: 'Select', // can be a text or translation string: organization.select_users.placeholder => # 'Select ${models.plural.user} (%{count})'
|
|
options: [],
|
|
selected: [],
|
|
placeholder_text: Ember.computed('placeholder', function() {
|
|
var placeholder;
|
|
placeholder = this.get('placeholder');
|
|
if (is_translation_path(placeholder)) {
|
|
placeholder = t(placeholder, {
|
|
count: this.get('options.length')
|
|
});
|
|
}
|
|
return placeholder.htmlSafe();
|
|
})
|
|
});
|