angular-ui/ui-grid

Single bind breaks grid when row is removed

Open

#5.831 geöffnet am 25. Nov. 2016

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (2.496 Forks)batch import
help wanted

Repository-Metriken

Stars
 (5.395 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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.

Contributor Guide