ui-grid
ui-grid copied to clipboard
ui-grid-resize-columns don't seem to take effect. Leads to title row growth
I use angular ui-grid. I have included the appropriate injects as follows in the controller.
controller.js :
'use strict';
//'ui.grid' is dependency injected into angular
var bbApp = angular.module('bbApp', ['ui.grid', 'ui.grid.selection', 'ui.grid.resizeColumns', 'ui.bootstrap']);
// Below is the code to allow cross domain request from web server through angular.js
bbApp.config(['$httpProvider', function($httpProvider, $routeProvider, $locationProvider) {
$httpProvider.defaults.useXDomain = true;
delete $httpProvider.defaults.headers.common['X-Requested-With'];
}
]);
bbApp.controller('BBCtrl', function ($scope, $http, uiGridConstants) {
var url_design_memory = '/members'; // URL where the Node.js server is running
queryWalltimeList();
// Accessing the Angular $http Service to get data via REST Communication from Node Server
function queryWalltimeList() {
console.log("Querying design versus memory");
$http.get(url_design_memory).success(function(data) {
$scope.walltimeList = data;
})
.error(function(data, status) {
console.log("Error from controller. Could not query DB.");
});
}
$scope.walltimeGrid = {
data: 'walltimeList',
columnDefs: [
{field: 'name', displayName: 'Design', width: "65%"},
{field: 'walltime', displayName: 'Memory', width: "35%"}
],
enableRowHeaderSelection: false,
enableFiltering: true,
multiSelect: false,
enableGridMenu: true,
enableSorting: true,
enableColumnResizing: true
};
$scope.walltimeGrid.onRegisterApi = function(gridApi){
//set gridApi on scope
$scope.gridApi = gridApi;
$scope.gridApi.selection.selectAllRows( $scope.gridApi.grid );
};
});
My HTML :
<section>
<div ui-grid="walltimeGrid" ui-grid-selection ui-grid-resize-columns class="bb-grid">
</section>
My CSS :
.bb-grid {
width: 300;
height: 200;
overflow-y: auto;
}
All the modules are available and accessible. But when the table is rendered, resizing does not occur.

This seems to be similar to the issue https://github.com/angular-ui/ui-grid/issues/1776 but I cant seem to solve it. Any help please..
I use ui-grid-resize-columns in my app and don't have a problem. Can you create a Plunker to recreate the problem?
I had the same issue when I forgot to add DOCTYPE on the top of document
<!doctype html>