angularjs - angular-ui-grid nested in angular-ui-layout with 100% height -


i trying show angular-ui-grid in 1 of containers/panes of angular-ui-layout. container should contain toolbar @ top , remaining space should filled either chart or corresponding data table tried solve flexgrid , ng-include. problem don't ui-grid initialize correctly when first shown , not fill remaining space. not reliably resize when resize browser window, not grow accordingly, not shrink it's scrollbars misaligned.

i tried using handlewindowresize , ui-grid-auto-resize no avail.

the ui-layout this:

<div ui-layout="{flow : 'column'}"  >     <div ui-layout-container size="20%">        <ul>         <li>item 1</li>         <li>item 2</li>         <li>item 3</li>       </ul>     </div>      <div ui-layout-container>        <div style="height:100%;display:flex;flex-flow:column;padding:10px">          <form role="form" style="padding-bottom:10px">           <label>toolbar</label>           <button ng-click="showanalysis1=true">analysis 1</button>           <button ng-click="showanalysis1=false">analysis 2</button>         </form>          <form role="form" style="padding-bottom:10px">           <label>sub-toolbar</label>           <button ng-click="showchart=true">show chart</button>           <button ng-click="setshowchart(false)">show table</button>         </form>          <div class="analysis-container" ng-show="showanalysis1" ng-include="'analysis1.html'">         </div>          <div class="analysis-container" ng-show="!showanalysis1" ng-include="'analysis2.html'">         </div>        </div>      </div>  </div> 

and ui-grid in ng-include dummy chart, f.e.

<div ng-show="showchart">   here goes chart analysis 1... </div>  <div ng-show="!showchart" class="my-grid-container">   <div  ui-grid="tableoptions" class="my-grid" ui-grid-auto-resize>   </div>   </div> 

the following plnkr shows in context:

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

to reproduce:

  • press either analysis1 or analysis2
  • press show table
  • resize browser window several times

please ignore ui-layout splitter now. @ moment interested in resizing browser window , having ui-grid fill remaining space @ all.

i see have correctly added directive ui-grid-auto-resize, must specify module dependency module:

angular.module('x', ['ui.layout', 'ui.grid','ui.grid.autoresize']) 

http://plnkr.co/edit/8vmwsvbgnbtznsjdl95c?p=preview


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -