[英]popupParent not known property of 'ag-grid-angular'
我在我的應用程序中有一個功能齊全的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");
預期的結果應該是我將彈出父項設置為文檔的body元素,因此當我打開菜單時,它不會被剪切到網格中。
這是由於我的ag-grid-angular版本,它是11,所以popupParent屬性確實不存在。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.