Bonjour,
j'utilise les ui-grid de Angularjs,
j'utilise le listener "gridApi.expandable.on.rowExpandedStateChanged" qui est déclanché lorsqu'une row est déployé
Voici mon code
et mon browser m'indique l'erreur suivante
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 $scope.searchCfgridOptions = { ................................ ................................ onRegisterApi : function(gridApi) { $scope.gridApi = gridApi; $scope.gridApi.expandable.on.rowExpandedStateChanged( $scope, function(row) { var childrenLength = $scope.gridApi.treeBase.getRowChildren( row ).length; console.log('childrenLength='+childrenLength); if (row.isExpanded) { $scope.gridCapacityFileHeight += 30 * childrenLength; } }); }
Merci d'avance pour vos suggestionsTypeError: Cannot read property 'on' of undefined
at Object.$scope.searchCfgridOptions.onRegisterApi
Partager