akveo / akveo/ng2-smart-table

Filter not picking up new changes

Abierto
#575 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
1.6k
Forks
867
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.