1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | import Ember from "ember"; import layout from "../templates/components/nested-em-flickity"; export default Ember.Component.extend({ layout, flickity: null, didUpdateAttrs() { this._super(...arguments); this.handleAmountChange(); }, handleAmountChange() { const index = this.get("currentIndex"); this.get("flickity").select(index); }, actions: { handleSettle(index, flickity) { this.selectionEnabled = true; this.set("flickity", flickity); }, }, }); |