ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

ui-grid cannot rendered correctly when using ng-show/ng-hide, if you press F12 on the keyboard, it can do it correctly

Open JavaBasketball opened this issue 11 years ago • 5 comments

My code is as below:

<div class="gridStyle" ng-grid="gridOptions" ng-show="flag"></div>

when i set the flag to true, the grid cannot render correctly, if you press F12 on the keyboard, it can show correctly!

JavaBasketball avatar Oct 21 '15 11:10 JavaBasketball

try it like this..

<div  ng-show="flag">
<div class="gridStyle" ng-grid="gridOptions"></div>
</div>

is working for me...

kandarpbhesaniya avatar Oct 24 '15 12:10 kandarpbhesaniya

@kandarpbhesaniya thank u, but it didn't work for me!

JavaBasketball avatar Nov 02 '15 07:11 JavaBasketball

Using ng-if fixed it for me. So, like this:

<div class="gridStyle" ng-grid="gridOptions" ng-if="flag"></div>

DGarvanski avatar Nov 17 '15 15:11 DGarvanski

:+1: I've seen the same problem, if I do ng-show on the parent div that contains the ui-grid, all kinds of weird things do not work right. ng-if works fine though.

brettjacobson avatar Nov 18 '15 13:11 brettjacobson

This is documented in http://ui-grid.info/docs/#/tutorial/108_hidden_grids, so whilst it's not ideal behaviour, it is expected behaviour. You should use ng-if. On that basis, closing.

PaulL1 avatar Nov 18 '15 19:11 PaulL1