angular-ui/ui-grid

Single bind breaks grid when row is removed

Open

#5.831 aberto em 25 de nov. de 2016

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)JavaScript (2.496 forks)batch import
help wanted

Métricas do repositório

Stars
 (5.395 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Within my cell templates I'm using single bind. It works normally, but when I remove a row from my grid I need that all cells that are being displayed to be destroyed and recreated, otherwise my grid gets "full of garbage from other rows".

Using two-way databind works normally, but the browser can't handle my grid. Using single-bind make the trick, everything that I'm using works, I'm just having problem to remove rows in runtime from the grid.

My guess is that the cells are being reused, and I'm using single-bind so the digest cycle is not updating the cells content as it was expected, so I would like to "force it" somehow.

I tried removing the row from the dataset, set it invisible with a rowProcessor, and ng-hide/ng-if on the row (uiGridViewport). After removing the row I tried, refresh(), queueRefresh(), notifyDataChange(), but the cells are never rerendered again. In this issue #2198 it stated that ui-grid doesn't work with single-bind, but it works just fine for me, my problem is just when I remove a row.

Guia do colaborador