【问题标题】:How to fix responsiveness of ag-grid table?如何修复 ag-grid 表的响应性?
【发布时间】:2019-07-11 22:39:01
【问题描述】:

我在 Angular6 项目中使用 Ag-grid。我正面临 ag-grid 表响应能力的问题。当我最小化浏览器但它没有显示任何滚动时。最大列消失。但是当这些代码运行到 Plunker 时,它显示出响应能力。我无法确定问题所在。

我正在使用这些 ag-grid 版本:
"ag-grid": "^18.1.2",
"ag-grid-angular": "^18.1.0",
"ag-grid-community": "^19.0.0",
"ag-grid-enterprise": "^19.0.0",

//我的ts文件

  private gridApi;
  private gridColumnApi;

  private columnDefs;
  private rowData;


   public constructor() {
     this.columnDefs = [
        {
            headerName: 'Make',
            field: 'make',
            minWidth: 100,
        },
        {
            headerName: 'Model',
            field: 'model',
            minWidth: 100,
        },
        {
            headerName: 'Price',
            field: 'price',
            minWidth: 100,
        },
        {
            headerName: 'Price',
            field: 'a',
            minWidth: 100,
        },
        {
            headerName: 'Price',
            field: 'b',
            minWidth: 100,
        }

    ];
    this.rowData = [
        {
            make: 'Toyota',
            model: 'Celica',
            price: 35000,
            a: 'aa',
            b: 'bb',
            c: 'cc',
            d: 'dd',
        },
        {
            make: 'Toyota',
            model: 'Celica',
            price: 35000,
            a: 'aa',
            b: 'bb',
            c: 'cc',
            d: 'dd',
        }
    ];

}  

//我的html文件

 <ag-grid-angular
       #agGrid
       style="width: 100%; height: 100%;"
       id="myGrid"
       class="ag-theme-balham"
       [columnDefs]="columnDefs"
       [rowData]="rowData">
   </ag-grid-angular>

【问题讨论】:

    标签: angular ag-grid ag-grid-angular


    【解决方案1】:

    我已经解决了这个问题。这是一个包集成问题。我已经删除了 ag-grid 和 ag-grid-enterprise 包。然后解决了这个问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-11-25
      • 2020-04-03
      • 2019-08-21
      • 1970-01-01
      • 2019-03-10
      • 2022-01-26
      • 2017-01-07
      • 1970-01-01
      相关资源
      最近更新 更多