Reputation: 111
In the AngularJS UI-grid I would like to auto resize columns after I click to one column hiding, because now if I click to hide clumn there will be a empty place at the place where the column was.
Upvotes: 0
Views: 1211
Reputation: 6196
This will most probably because you are setting the column width in you columnDef. The reason the demos work are because they dont specify the column width and they just resize after the columns are hidden. Check you column def and make sure you are not setting the column width.
columnDefs: [
{ name: 'name',width:150 },
{ name: 'gender', enableHiding: false,width:150 },
{ name: 'company',width:150 }
],
columnDefs: [
{ name: 'name' },
{ name: 'gender', enableHiding: false },
{ name: 'company' }
],
There will be differences in the behavior with the above configs.
Upvotes: 1