@@ -7,6 +7,7 @@ import type { Invokable } from '@glint/template/-private/integration';
77import { fn } from ' @ember/helper' ;
88import type { TOC } from ' @ember/component/template-only' ;
99import type { TableApi } from ' ../tpk-table-generic/table.gts' ;
10+ import { on } from ' @ember/modifier' ;
1011
1112export interface TableParams {
1213 entity: string ;
@@ -108,6 +109,10 @@ export default class TableGenericPrefabComponent extends Component<TableGenericP
108109 return this .args .tableParams .actionMenu ;
109110 }
110111
112+ stopPropagation(e : Event ) {
113+ e .stopImmediatePropagation ();
114+ }
115+
111116 <template >
112117 <div class =' tpk-table-generic-container' data-test-table-generic-prefab >
113118 <TpkTableGeneric
@@ -131,12 +136,9 @@ export default class TableGenericPrefabComponent extends Component<TableGenericP
131136 </Table.Header >
132137 <Table.Body as | Body element | >
133138 {{#each this . columns as | column | }}
134- <Body.Cell >
135- {{#if column.component }}
136- {{#let
137- ( this.getComponent column.component )
138- as | ComponentName |
139- }}
139+ {{#if column.component }}
140+ {{#let ( this.getComponent column.component ) as | ComponentName | }}
141+ <Body.Cell {{on ' click' this . stopPropagation}} >
140142 <ComponentName
141143 @ row ={{element }}
142144 @ field ={{column.field }}
@@ -146,11 +148,13 @@ export default class TableGenericPrefabComponent extends Component<TableGenericP
146148 column.field
147149 }}
148150 />
149- {{/let }}
150- {{else }}
151+ </Body.Cell >
152+ {{/let }}
153+ {{else }}
154+ <Body.Cell >
151155 {{this .displayValue element column.field }}
152- {{/ if }}
153- </ Body.Cell >
156+ </ Body.Cell >
157+ {{/ if }}
154158 {{/each }}
155159 {{#if this . hasActionMenu }}
156160 <Body.ActionMenu as | Action | >
0 commit comments