swiety85 / angular2gridster

Angular implementation of well known Gridster (no jQuery, no external libraries, only Angular and Rx.js).
https://swiety85.github.io/angular2gridster/
MIT License
203 stars 75 forks source link

ERROR on creating gridster inside mat tab group #380

Open Jigna-Rathod opened 3 years ago

Jigna-Rathod commented 3 years ago

Following error occurs when i load gridster inside mat-tab-group core.js:6014 ERROR TypeError: Cannot read property 'parentNode' of null at parents (angular2gridster.js:175) at scrollParent (angular2gridster.js:214)

        <mat-tab-group [selectedIndex]="selected.value" (selectedIndexChange)="selected.setValue($event)">
            <mat-tab *ngFor="let tab of sheetTabs; let index = index" [label]="tab"> 

        <ngx-gridster [options]="gridsterOptions" [draggableOptions]="gridsterDraggableOptions"
            (reflow)="onReflow($event)" (optionsChange)="optionsChange($event)" #gridster1 class="dashboard">

            <ngx-gridster-item *ngFor="let widget of exportSheet.widgets; let indx = index" #itemComp
                (change)="updateWidgetPosition(itemComp,indx)" [options]="itemOptions"
                [dragAndDrop]="widget.dragAndDrop" [resizable]="widget.resizable" [(w)]="widget.gridProps.w"
                [(h)]="widget.gridProps.h">

              </ngx-gridster-item>

        </ngx-gridster>
        </mat-tab>
        </mat-tab-group>

Specs:: Angular 8 "angular2gridster": "^8.1.2",