angular-ui/ui-grid

Flicker effect when expanding a subgrid with a lot of columns, using ui-grid-auto-resize

Open

#3,048 创建于 2015年3月18日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)JavaScript (5,395 star) (2,496 fork)batch import
help wantedtype: bug

描述

I have an expandable grid that modifies its height dinamically when an item is expanded. I use rowExpandedStateChanged to increase the grid size accordingly:

   gridApi.expandable.on.rowExpandedStateChanged($scope, function(row){

          // Get grid height
          var gridHeight = $scope.getExpandableGridHeight( ... );

          // Set scope variable in pixels
          $scope.gridHeight = gridHeight + 'px';

      });
  },

In the HTML I am using ui-grid-auto-resize

What happens to me is that ui-grid-auto-resize works good in general, but when there is a subgrid with a lot of columns, the renderization shows an undesired flicker effect.

Here is my Plunkr, where the ROW with ID 2 contains a subgrid with a lot of columns, and the grid does this flicker effect I do not know how to avoid. Any help will be appreciated.

http://plnkr.co/edit/4NLMt6T4XP35E8uIy9dL?p=preview

I am using the last ui-grid-unstable, in this time is the ui-grid 3.0 RC 20.

PD: Please use the plunkr preview in a separate window and test the row 2 several times

贡献者指南