akveo / akveo/ng2-smart-table

Filter not picking up new changes

未关闭
#575 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
1.6k
派生
867
PR 合并指标
30 天内没有已合并 PR

描述

I have a field which is rendering a component
```
shoppingList: {
title: 'Add To Shopping List?',
type: 'custom',
filter: {
type: 'checkbox',
config: {
true: 'true',
false: 'false'
}
},
valuePrepareFunction: value => [value, 'shoppingList'],
renderComponent: CheckboxComponent
},
```
And that component determines whether a checkbox should be 'checked' or not by calling this function on click. Which basically just converts the boolean value to its opposite and then interacts with the API to save it to the DB.
```
changeBoolean() {
this.checked = !this.checked;
this.inventoryService.patchOne({
id: this.rowData._id,
query: {[this.name]: this.checked}
});
}
```
This is the template of the component...
```
template: `







`,
```

This all works perfectly, until a filter is applied. If 3 elements have their checkbox 'checked', then the filter is applied to only show those that are 'true' then they don't appear.

If the page is refreshed (f5) then the filter works fine.

Let me know if there is any more information that can be proved to help me get this solved.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。