问题标签 [ember-table]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
182 浏览

ember.js - 使用 ember 计算属性(过滤器)过滤模型并使用 ember-models-table 2 以表格格式显示。它没有记录显示

尝试使用 ember-models-table 插件显示用户详细信息。还想使用 isActive 字段过滤数据。我使用 ember 计算属性(过滤器)。第一次加载页面时得到正确的结果。但是当我尝试过滤时,我可以看到 currentfilter 的值被正确传递但没有得到任何结果。该表显示没有要显示的记录。

我的 .hbs 代码:

我的控制器代码:

请帮忙。

0 投票
0 回答
589 浏览

ember.js - I want to create a ember table component whose value is updated dynamically [Ember.js]

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

这是控制器端

这是组件方面

我将行变量传递给组件,表格渲染得很好。

但有时 model.data 中的值会发生变化,然后发生此错误