在模态窗口中ui-grid的调整大小不正确

时间:2014-12-26 19:51:11

标签: javascript angularjs angularjs-directive

ui-grid未在模态窗口中正确调整大小。我在这里做错了吗?

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

$scope.myData = [];

$scope.gridOptions =  { 
    data: 'myData',
    rowHeight: 40,
    columnDefs: [
        {field: 'name', displayName: 'Name'},
        {field:'age', displayName:'Age'},
        {field:'gender', displayName:'Gender'} ,
        {field:'ssn', displayName:'SSN'} ,
        {field:'workplace', displayName:'Workplace'} 

    ]
};

$timeout(function(){
  $scope.myData = [
    {name: "Moroni", age: 50, gender:"male", ssn:123, workplace:"foo"},
    {name: "Tiancum", age: 43, gender:"female", ssn:123, workplace:"foo"},
    {name: "Jacob", age: 27, gender:"male", ssn:123, workplace:"foo"}

]; 

},0)

感谢任何帮助。

由于

1 个答案:

答案 0 :(得分:0)

我认为你的问题与css有关而不是角度。

尝试将模态的表格设置为具有100%宽度的模态容器,应该解决它