1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/components/wizard-custom-input.js.es6
2020-03-22 04:30:11 +11:00

19 Zeilen
450 B
JavaScript

import { newPair } from '../lib/custom-wizard';
export default Ember.Component.extend({
classNames: 'custom-input',
outputConnectorKey: 'admin.wizard.connector.prefill',
outputPrefixKey: 'admin.wizard.if',
actions: {
addPair() {
this.get('input.pairs').pushObject(
newPair(this.options, this.input.pairs.length)
);
},
removePair(pair) {
this.get('input.pairs').removeObject(pair);
}
}
});