When I use ember-table, it works well in application.hbs, but if the same code used as component, I got targetValue Assertion Fail, is there anyway to use EmberTable in component?
application.hbs
<TestComp />
test-comp.hbs
<EmberTable as |t| >
<t.head @columns={{this.columns}} />
<t.body
@rows={{this.rows}}
@onSelect={{action (mut this.selection)}}
@selection={{this.selection}}
/>
</EmberTable>
test-comp.js
export default class testComponent extends Component {
@tracked selection;
get columns() {
return [
{ name: 'A', valuePath: 'A', width: 180 },
{ name: 'B', valuePath: 'B', width: 180 },
{ name: 'C', valuePath: 'C', width: 180 },
];
}
get rows() {
return [
{ A: 'A', B: 'B', C: 'C'},
{ A: 'A', B: 'B', C: 'C'},
];
}
}