0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-10 04:12:53 +01:00
discourse-custom-wizard/assets/javascripts/discourse/components/wizard-custom-input-pair.js.es6
Angus McLeod 3a14cb0805 wip
2020-03-23 16:41:04 +11:00

14 Zeilen
Kein EOL
495 B
JavaScript

import { connectors } from '../lib/custom-wizard';
import { gt, or, alias } from "@ember/object/computed";
import { computed, observes} from "@ember/object";
export default Ember.Component.extend({
classNames: 'pair',
connectors: connectors,
hasConnector: or('options.enableConnectors', 'connectorKey'),
firstPair: gt('pair.index', 0),
showRemove: alias('firstPair'),
showJoin: computed('pair.pairCount', function() {
return this.pair.index < (this.pair.pairCount - 1);
})
})