when i bind a tracked variable to the ember table, this is the error that i get
Error: Assertion Failed: You attempted to update rows on <(unknown):ember472>, but it had already been used previously in the same computation. Attempting to update a value after using it in a computation can cause logical errors, infinite revalidation bugs, and performance issues, and is not supported.
rows was first used:
So how do i go about creating a table which changes the value according to the value in the tracked variable
这是控制器端
@tracked rows = this.model.row
这是组件方面
<EmberTable as |t|>
<t.head @columns={{@columns}} @widthConstraint="eq-container" />
<t.body @rows={{@rows}} as |b|>
<b.row as |r|>
<r.cell as |value|>
{{value}}
</r.cell>
</b.row>
</t.body>
</EmberTable>
我将行变量传递给组件,表格渲染得很好。
但有时 model.data 中的值会发生变化,然后发生此错误