diff --git a/src/app/examples/swt-common-grid-pagination.component.ts b/src/app/examples/swt-common-grid-pagination.component.ts index afb39bb21..32104c3eb 100644 --- a/src/app/examples/swt-common-grid-pagination.component.ts +++ b/src/app/examples/swt-common-grid-pagination.component.ts @@ -151,6 +151,6 @@ export class SwtCommonGridPaginationComponent implements OnInit { onPageChanged(event?: Event, pageNumber?: number) { this.logger.info('method [onPageChanged] - START/END', this.commonGrid); - this.commonGrid.onPaginationChanged(event, { newPage: pageNumber, pageSize: -1 }); + this.commonGrid.processOnPaginationChanged(event, { newPage: pageNumber, pageSize: -1 }); } } diff --git a/src/app/examples/swt-common-grid.component.ts b/src/app/examples/swt-common-grid.component.ts index ba763fcd9..ca5afbcf7 100644 --- a/src/app/examples/swt-common-grid.component.ts +++ b/src/app/examples/swt-common-grid.component.ts @@ -332,7 +332,7 @@ export class SwtCommonGridComponent implements OnInit, AfterViewInit, BackendSer * @param event * @param args */ - onFilterChanged( event: Event, args: FilterChangedArgs ): Promise { + processOnFilterChanged( event: Event, args: FilterChangedArgs ): Promise { this.logger.info('method [onFilterChanged] - START', args); this.filteredGridColumns = ''; let timing = 0; @@ -369,7 +369,7 @@ export class SwtCommonGridComponent implements OnInit, AfterViewInit, BackendSer * @param event * @param args */ - onPaginationChanged( event: Event, args: PaginationChangedArgs ) { + processOnPaginationChanged( event: Event, args: PaginationChangedArgs ) { this.logger.info('method [onPaginationChanged] - START'); this.currentPage = args.newPage; this.onPaginationChanged_.emit(args); @@ -382,7 +382,7 @@ export class SwtCommonGridComponent implements OnInit, AfterViewInit, BackendSer * @param event * @param args */ - onSortChanged( event: Event, args: SortChangedArgs ) { + processOnSortChanged( event: Event, args: SortChangedArgs ) { this.logger.info('method [onSortChanged] - START'); this.sortedGridColumn = ''; const sortDirection = '|' + args.sortCols[0].sortAsc + '|'; diff --git a/src/app/modules/angular-slickgrid/components/slick-pagination.component.ts b/src/app/modules/angular-slickgrid/components/slick-pagination.component.ts index 6ab12c02c..047c2488e 100644 --- a/src/app/modules/angular-slickgrid/components/slick-pagination.component.ts +++ b/src/app/modules/angular-slickgrid/components/slick-pagination.component.ts @@ -166,7 +166,7 @@ export class SlickPaginationComponent implements AfterViewInit, OnDestroy { backendApi.preProcess(); } - const query = backendApi.service.onPaginationChanged(event, { newPage: pageNumber, pageSize: itemsPerPage }); + const query = backendApi.service.processOnPaginationChanged(event, { newPage: pageNumber, pageSize: itemsPerPage }); // the process could be an Observable (like HttpClient) or a Promise // in any case, we need to have a Promise so that we can await on it (if an Observable, convert it to Promise) diff --git a/src/app/modules/angular-slickgrid/models/backendService.interface.ts b/src/app/modules/angular-slickgrid/models/backendService.interface.ts index 245f7fa95..a253b3a58 100644 --- a/src/app/modules/angular-slickgrid/models/backendService.interface.ts +++ b/src/app/modules/angular-slickgrid/models/backendService.interface.ts @@ -55,11 +55,11 @@ export interface BackendService { // ----------------- /** Execute when any of the filters changed */ - onFilterChanged: (event: Event, args: FilterChangedArgs) => Promise; + processOnFilterChanged: (event: Event, args: FilterChangedArgs) => Promise; /** Execute when the pagination changed */ - onPaginationChanged: (event: Event | undefined, args: PaginationChangedArgs) => string; + processOnPaginationChanged: (event: Event | undefined, args: PaginationChangedArgs) => string; /** Execute when any of the sorters changed */ - onSortChanged: (event: Event, args: SortChangedArgs) => string; + processOnSortChanged: (event: Event, args: SortChangedArgs) => string; } diff --git a/src/app/modules/angular-slickgrid/services/filter.service.ts b/src/app/modules/angular-slickgrid/services/filter.service.ts index 31383ebb4..49243416e 100644 --- a/src/app/modules/angular-slickgrid/services/filter.service.ts +++ b/src/app/modules/angular-slickgrid/services/filter.service.ts @@ -86,7 +86,7 @@ export class FilterService { } // call the service to get a query back - const query = await backendApi.service.onFilterChanged(event, args); + const query = await backendApi.service.processOnFilterChanged(event, args); // emit an onFilterChanged event this.emitFilterChanged('remote'); diff --git a/src/app/modules/angular-slickgrid/services/graphql.service.ts b/src/app/modules/angular-slickgrid/services/graphql.service.ts index a2761159e..2a67f5941 100644 --- a/src/app/modules/angular-slickgrid/services/graphql.service.ts +++ b/src/app/modules/angular-slickgrid/services/graphql.service.ts @@ -244,7 +244,7 @@ export class GraphqlService implements BackendService { /* * FILTERING */ - onFilterChanged(event: Event, args: FilterChangedArgs): Promise { + processOnFilterChanged(event: Event, args: FilterChangedArgs): Promise { const gridOptions: GridOption = this._gridOptions || args.grid.getOptions(); const backendApi = gridOptions.backendServiceApi; @@ -304,7 +304,7 @@ export class GraphqlService implements BackendService { * } * } */ - onPaginationChanged(event: Event, args: PaginationChangedArgs) { + processOnPaginationChanged(event: Event, args: PaginationChangedArgs) { const pageSize = +(args.pageSize || ((this.pagination) ? this.pagination.pageSize : DEFAULT_PAGE_SIZE)); this.updatePagination(args.newPage, pageSize); @@ -317,7 +317,7 @@ export class GraphqlService implements BackendService { * we will use sorting as per a Facebook suggestion on a Github issue (with some small changes) * https://github.com/graphql/graphql-relay-js/issues/20#issuecomment-220494222 */ - onSortChanged(event: Event, args: SortChangedArgs) { + processOnSortChanged(event: Event, args: SortChangedArgs) { const sortColumns = (args.multiColumnSort) ? args.sortCols : new Array({ sortCol: args.sortCol, sortAsc: args.sortAsc }); // loop through all columns to inspect sorters & set the query diff --git a/src/app/modules/angular-slickgrid/services/grid-odata.service.ts b/src/app/modules/angular-slickgrid/services/grid-odata.service.ts index cf055b2c6..6f1f41390 100644 --- a/src/app/modules/angular-slickgrid/services/grid-odata.service.ts +++ b/src/app/modules/angular-slickgrid/services/grid-odata.service.ts @@ -119,7 +119,7 @@ export class GridOdataService implements BackendService { /* * FILTERING */ - onFilterChanged(event: Event, args: FilterChangedArgs): Promise { + processOnFilterChanged(event: Event, args: FilterChangedArgs): Promise { const serviceOptions: GridOption = args.grid.getOptions(); const backendApi = serviceOptions.backendServiceApi; @@ -152,7 +152,7 @@ export class GridOdataService implements BackendService { /* * PAGINATION */ - onPaginationChanged(event: Event, args: PaginationChangedArgs) { + processOnPaginationChanged(event: Event, args: PaginationChangedArgs) { const pageSize = +(args.pageSize || DEFAULT_PAGE_SIZE); this.updatePagination(args.newPage, pageSize); @@ -163,7 +163,7 @@ export class GridOdataService implements BackendService { /* * SORTING */ - onSortChanged(event: Event, args: SortChangedArgs) { + processOnSortChanged(event: Event, args: SortChangedArgs) { const sortColumns = (args.multiColumnSort) ? args.sortCols : new Array({ sortCol: args.sortCol, sortAsc: args.sortAsc }); // loop through all columns to inspect sorters & set the query diff --git a/src/app/modules/angular-slickgrid/services/sort.service.ts b/src/app/modules/angular-slickgrid/services/sort.service.ts index f1834332a..fb3fcd0b4 100644 --- a/src/app/modules/angular-slickgrid/services/sort.service.ts +++ b/src/app/modules/angular-slickgrid/services/sort.service.ts @@ -65,7 +65,7 @@ export class SortService { if (backendApi.preProcess) { backendApi.preProcess(); } - const query = backendApi.service.onSortChanged(event, args); + const query = backendApi.service.processOnSortChanged(event, args); this.emitSortChanged('remote'); // the process could be an Observable (like HttpClient) or a Promise