Hi
I have a component with 4 grids, i want to implement a contextmenu in each of them.
But when i want to set a contextmenu for any(doesnt matter which of the 4) grid. The following error appears upon initialization of the component:
ERROR TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
at getScrollableParent (popup.js:667)
at ContextMenu.push../node_modules/@syncfusion/ej2-navigations/src/common/menu-base.js.MenuBase.wireEvents (menu-base.js:244)
at ContextMenu.push../node_modules/@syncfusion/ej2-navigations/src/common/menu-base.js.MenuBase.render (menu-base.js:194)
at ContextMenu.push../node_modules/@syncfusion/ej2-base/src/component.js.Component.appendTo (component.js:130)
at ContextMenu.push../node_modules/@syncfusion/ej2-grids/src/grid/actions/context-menu.js.ContextMenu.render (context-menu.js:96)
at Observer.push../node_modules/@syncfusion/ej2-base/src/observer.js.Observer.notify (observer.js:89)
at GridComponent.push../node_modules/@syncfusion/ej2-base/src/component.js.Component.notify (component.js:189)
at GridComponent.push../node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js.Grid.render (grid.js:688)
at GridComponent.push../node_modules/@syncfusion/ej2-base/src/component.js.Component.appendTo (component.js:130)
at component-base.js:100
Any idea what is causing this or referring to?
.HTML
<div class="flex-column">
<ejs-grid #grid1 id="grid1" height="110px"
[columns]='columns1'
[dataSource]='dataSource1'
rowHeight='20'
droppable
[allowSelection]='true'
(onDrop)="onGridDrop1($event)"
(dblclick)="onRowsClick($event)"
[editSettings]='editSettings'
[contextMenuItems]="contextMenuItems"
[dragOverClass]="'drag-target-border-green'"
[dragHintClass]="'drag-hint'">
</ejs-grid>
</div>
.TS
import { GridComponent, SelectionService, EditSettingsModel, ContextMenuItem, ContextMenuService } from "@syncfusion/ej2-angular-grids";
providers: [ContextMenuService, SelectionService]
columns1: object[] = [{ field: 'name', headerText: 'Rows', textAlign: 'Left', width: 40, isPrimaryKey: true }];
editSettings: EditSettingsModel = { allowDeleting: true };
contextMenuItems: ContextMenuItem[] = ['Delete'];
.PACKAGE.JSON
"@syncfusion/ej2-angular-base": "~16.4.47",
"@syncfusion/ej2-angular-buttons": "~16.4.47",
"@syncfusion/ej2-angular-calendars": "~16.4.47",
"@syncfusion/ej2-angular-diagrams": "~16.4.47",
"@syncfusion/ej2-angular-dropdowns": "~16.4.47",
"@syncfusion/ej2-angular-grids": "~16.4.47",
"@syncfusion/ej2-angular-inputs": "~16.4.47",
"@syncfusion/ej2-angular-lists": "~16.4.47",
"@syncfusion/ej2-angular-maps": "^16.4.55",
"@syncfusion/ej2-angular-navigations": "~16.4.47",
"@syncfusion/ej2-angular-popups": "~16.4.47",
"@syncfusion/ej2-angular-richtexteditor": "~16.4.47",
"@syncfusion/ej2-angular-schedule": "~16.4.47",
"@syncfusion/ej2-angular-splitbuttons": "~16.4.47",
"@syncfusion/ej2-data": "~16.4.47",
"@syncfusion/ej2-maps": "^16.4.55",