我在我的应用程序中有一个全功能的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");预期的结果应该是,我将弹出式父元素设置为文档的正文元素,这样当我打开菜单时,它就不会被裁剪到网格中。
发布于 2019-04-17 19:51:29
这是因为我的ag-grid-angular版本是11,所以popupParent属性确实不存在。
https://stackoverflow.com/questions/55420338
复制相似问题