diff --git a/addon/components/ember-td/template.hbs b/addon/components/ember-td/template.hbs index 4cbab5045..4678a15d5 100644 --- a/addon/components/ember-td/template.hbs +++ b/addon/components/ember-td/template.hbs @@ -1,30 +1,38 @@ {{#if this.isFirstColumn}}
{{#if this.canSelect}} - - - - + {{#if (has-block "select")}} + {{yield this.rowMeta (action "onSelectionToggled") to="select"}} + {{else}} + + + + + {{/if}} {{/if}} {{#if this.canCollapse}} - - - - + {{#if (has-block "collapse")}} + {{yield this.rowMeta (action "onCollapseToggled") to="collapse"}} + {{else}} + + + + + {{/if}} {{else}}
{{/if}} diff --git a/types/components/ember-td/component.d.ts b/types/components/ember-td/component.d.ts index 774b0ffe7..c42cc0aa3 100644 --- a/types/components/ember-td/component.d.ts +++ b/types/components/ember-td/component.d.ts @@ -23,6 +23,14 @@ export interface EmberTdSignature { columnMeta: unknown, rowMeta: TableRowMeta, ]; + select?: [ + rowMeta: TableRowMeta, + onSelectionToggled: () => void, + ]; + collapse?: [ + rowMeta: TableRowMeta, + onCollapseToggled: () => void, + ]; }; }