javascript - Not all rows are rendered in ng-grid -


in project i'm fetching data server, , receive 20 data-items. however, 6 rows rendered, , inside ng-repeat there 6 of them. height of canvas calculated correctly other items appears after resize of window. issue similar to: https://github.com/angular-ui/ng-grid/issues/860 using virtualizationthreshold doesn't work me , there no other way around

here part of controllers code:

app.controller('nagruzkacontroller', ['$scope', 'nagruzkaservice', 'cacher', 'rawinforetriever', '$timeout', function ($scope, nagruzkaservice, cacher, rawinforetriever, $timeout) {     $scope.configrequest = {};      $scope.showloader = false;     $scope.showtable = false;      $scope.fetch = function () {         $scope.showloader = true;              nagruzkaservice.getall().then(function (data) {                 var tmp = rawinforetriever(data);                 $scope.nagruzkadata = tmp;                 cacher.nagruzka = $scope.nagruzkadata;                  $scope.showloader = false;                 $scope.showtable = true;             });         }     };      $scope.gridoptions = {         data: 'nagruzkadata',         enablecolumnresize: true,         showgrouppanel: true     }; 

in html template use ng-grid in way:

<div class="gridstyle" ng-grid="gridoptions" ng-show="showtable"></div> 

i got ng-grid via npm , current version 2.0.1 i've tried later version , tried use 2.0.14, version rows not shown @ all, untill window resizing.

can me this?

you have use ng-grid plugin flexible height plugin. add plugin plugins property of grid options.

$scope.gridoptions = {     data: 'nagruzkadata',     enablecolumnresize: true,     showgrouppanel: true,     plugins: [new nggridflexibleheightplugin()] }; 

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -