angular-ui/ui-grid

Table data not rendering properly during the timeout

Open

#4,564 建立於 2015年10月23日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)JavaScript (5,395 star) (2,496 fork)batch import
help wantedneeds: analysis

描述

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

貢獻者指南