open-consul/ui-v2/app/components/tabular-details.js
John Cowen 8483f0c27c
ui: Custom version of ember-block-slots compatible with ember 3 (#5245)
The original version of ember-block-slots doesn't support ember 3 and it
seems like development has stalled on the original version.

This adds a modified version as an in-repo-addon that is compatible with
ember 3.
2019-01-30 10:56:04 +00:00

18 lines
492 B
JavaScript

import Component from '@ember/component';
import SlotsMixin from 'block-slots';
import closest from 'consul-ui/utils/dom/closest';
import clickFirstAnchorFactory from 'consul-ui/utils/dom/click-first-anchor';
const clickFirstAnchor = clickFirstAnchorFactory(closest);
export default Component.extend(SlotsMixin, {
onchange: function() {},
actions: {
click: function(e) {
clickFirstAnchor(e);
},
change: function(item, e) {
this.onchange(e, item);
},
},
});