Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 517da7d

Browse files
committed
docs: replace deprecated event by onAngularGridCreated
1 parent d721291 commit 517da7d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/app/examples/swt-common-grid.component.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Component, OnInit, AfterViewInit, Input, EventEmitter, Output, ViewChild, ElementRef, Renderer2 } from '@angular/core';
22
import { HttpClient } from '@angular/common/http';
33
import {
4+
AngularGridInstance,
45
AngularSlickgridComponent, Column, FieldType,
56
GridOption, BackendService,
67
BackendServiceOption, FilterChangedArgs, PaginationChangedArgs, Pagination, SlickGrid, SlickDataView
@@ -22,8 +23,7 @@ const DEFAULT_FILTER_TYPING_DEBOUNCE = 750;
2223
selector: 'swt-common-grid',
2324
template: `<angular-slickgrid gridId='common-grid'
2425
#angularSlickGrid
25-
(onDataviewCreated)="dataviewReady($event.detai)"
26-
(onGridCreated)="gridReady($event.detail)"
26+
(onAngularGridCreated)="gridReady($event.detail)"
2727
[columnDefinitions]="columnDefinitions"
2828
[gridOptions]="gridOptions"
2929
[dataset]="dataset">
@@ -207,7 +207,7 @@ export class SwtCommonGridComponent implements OnInit, AfterViewInit, BackendSer
207207
sortable: this.columnData[index].sort,
208208
filterable: this.columnData[index].filterable,
209209
type,
210-
editor: editor,
210+
editor,
211211
formatter,
212212
filter,
213213
outputType,
@@ -287,9 +287,10 @@ export class SwtCommonGridComponent implements OnInit, AfterViewInit, BackendSer
287287
return this.dataset;
288288
}
289289

290-
gridReady(grid: SlickGrid) {
290+
gridReady(instance: AngularGridInstance) {
291291
this.logger.info('method [gridReady] - START');
292-
this.gridObj = grid;
292+
this.gridObj = instance.slickGrid;
293+
this.dataviewObj = instance.dataView;
293294
this.logger.info('method [gridReady] - END');
294295
}
295296

0 commit comments

Comments
 (0)