0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-14 13:52:54 +01:00
discourse-custom-wizard/assets/javascripts/discourse/components/wizard-custom-step.js.es6

19 Zeilen
524 B
Text

2017-10-19 04:17:36 +02:00
import { observes } from 'ember-addons/ember-computed-decorators';
2017-09-23 04:34:07 +02:00
export default Ember.Component.extend({
classNames: 'wizard-custom-step',
2017-10-06 04:59:02 +02:00
currentField: null,
currentAction: null,
2017-10-19 04:17:36 +02:00
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
});
}
2017-09-23 04:34:07 +02:00
});