11import { Component , OnInit , AfterViewInit , Input , EventEmitter , Output , ViewChild , ElementRef , Renderer2 } from '@angular/core' ;
22import { HttpClient } from '@angular/common/http' ;
33import {
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