【问题标题】:popupParent not known property of 'ag-grid-angular'popupParent 'ag-grid-angular' 的未知属性
【发布时间】:2019-04-17 19:51:28
【问题描述】:

我的应用程序中有一个功能齐全的 ag-grid-angular,但只要我添加 [popupParent],它就会说它无法绑定,因为它没有 ag-grid-angular 的已知属性。

这行得通:

<ag-grid-angular [id]="name" #grid style="width: 100%;" [gridOptions]="gridOptions" (gridReady)="setDatasource()"(cellContextMenu)="onRightClick()" >

这不是:

<ag-grid-angular [id]="name" #grid style="width: 100%;" [gridOptions]="gridOptions" (gridReady)="setDatasource()" [popupParent]="popupParent"(cellContextMenu)="onRightClick()" >

在组件中:

private popupParent: HTMLElement;

在构造函数中我只是添加

 this.popupParent = document.querySelector("body");

预期的结果应该是我将弹出的父级设置为文档的主体元素,这样当我打开菜单时,它就不会被剪切到网格内。

【问题讨论】:

    标签: angular ag-grid-angular


    【解决方案1】:

    这是由于我的 ag-grid-angular 版本是 11,因此 popupParent 属性确实不存在。

    【讨论】:

      猜你喜欢
      • 2019-11-13
      • 2017-10-29
      • 2022-01-27
      • 2020-09-24
      • 2021-06-25
      • 2020-11-18
      • 2019-07-30
      • 2018-10-26
      • 2018-11-14
      相关资源
      最近更新 更多