Skip to content

Commit 7d89b39

Browse files
authored
Merge pull request #1311 from ghiscoding/chore/use-cursor
chore: prefer `useCursor` instead of deprecated `isWithCursor`
2 parents 768a0ae + b6060f7 commit 7d89b39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/app/examples/grid-graphql.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ export class GridGraphqlComponent implements OnInit, OnDestroy {
194194
field: 'userId',
195195
value: 123
196196
}],
197-
isWithCursor: this.isWithCursor, // sets pagination strategy, if true requires a call to setPageInfo() when graphql call returns
197+
useCursor: this.isWithCursor, // sets pagination strategy, if true requires a call to setPageInfo() when graphql call returns
198198
// when dealing with complex objects, we want to keep our field name with double quotes
199199
// example with gender: query { users (orderBy:[{field:"gender",direction:ASC}]) {}
200200
keepArgumentFieldDoubleQuotes: true
@@ -359,13 +359,13 @@ export class GridGraphqlComponent implements OnInit, OnDestroy {
359359

360360
setIsWithCursor(isWithCursor: boolean) {
361361
this.isWithCursor = isWithCursor;
362-
this.resetOptions({ isWithCursor: this.isWithCursor });
362+
this.resetOptions({ useCursor: this.isWithCursor });
363363
return true;
364364
}
365365

366366
private resetOptions(options: Partial<GraphqlServiceOption>) {
367367
const graphqlService = this.gridOptions.backendServiceApi!.service as GraphqlService;
368-
this.angularGrid.paginationService!.setCursorBased(options.isWithCursor!);
368+
this.angularGrid.paginationService!.setCursorBased(options.useCursor as boolean);
369369
graphqlService.updateOptions(options);
370370
this.gridOptions = { ...this.gridOptions };
371371
this.angularGrid.paginationService?.goToFirstPage();

0 commit comments

Comments
 (0)