1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/components/wizard-custom-field.js.es6

22 Zeilen
523 B
Text

2017-09-23 04:34:07 +02:00
import { observes } from 'ember-addons/ember-computed-decorators';
export default Ember.Component.extend({
classNames: 'wizard-custom-field',
fieldTypes: ['dropdown', 'image', 'radio', 'text', 'textarea'],
isDropdown: Ember.computed.equal('field.type', 'dropdown'),
choices: Ember.A(),
@observes('field.label')
setFieldId() {
const label = this.get('field.label');
console.log('setting id')
this.set('field.id', Ember.String.underscore(label));
},
actions: {
addChoice() {
}
}
});