1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/components/wizard-custom-step.js.es6
2017-10-19 10:17:36 +08:00

18 Zeilen
524 B
JavaScript

import { observes } from 'ember-addons/ember-computed-decorators';
export default Ember.Component.extend({
classNames: 'wizard-custom-step',
currentField: null,
currentAction: null,
disableId: Ember.computed.not('step.isNew'),
@observes('step')
resetCurrentObjects() {
const fields = this.get('step.fields');
const actions = this.get('step.actions');
this.setProperties({
currentField: fields.length ? fields[0] : null,
currentAction: actions.length ? actions[0] : null
});
}
});