angular-ui/ui-grid

Table data not rendering properly during the timeout

Open

#4564 aperta il 23 ott 2015

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)JavaScript (2496 fork)batch import
help wantedneeds: analysis

Metriche repository

Star
 (5395 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Hi,

I have an issue with the output of table data during the database call for $http.post request in my original code. I have added an $http.get and explicit timeout here to reproduce the issue. Plunker is below.

There might be some redundant code here, but I wanted to keep it as close as possible to my original code. Some stuff I had to remove. The idea is to put and remove dynamically a secondary sort which would be applied on appropriate column and reset it everytime on a new submit.

How to reproduce: Click on Tab 2 - click on any radio button - press submit. Observe that during the timeout the table data is being rendered wrong. After timeout, the data is displayed properly and appropriate sort is applied.

Why the table data is messed up during the timeout? I tried to use notifyDataChange(uiGridConstants.dataChange.ALL) and refresh(), but it didn't help. Is there a way to fix it?

http://plnkr.co/edit/N0PuWgzoHcOWAdXfKntt?p=preview

Thanks

Guida contributor