Skip to content

Commit

Permalink
fix(backend): backend filter on delay was broken since GridState feature
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Mar 7, 2018
1 parent 5bd7215 commit a25147d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,12 @@ export class GraphqlService implements BackendService {
throw new Error('Something went wrong when trying create the GraphQL Backend Service, it seems that "args" is not populated correctly');
}

// loop through all columns to inspect filters & set the query
this.updateFilters(args.columnFilters, false);

// reset Pagination, then build the GraphQL query which we will use in the WebAPI callback
// wait a minimum user typing inactivity before processing any query
clearTimeout(timer);
timer = setTimeout(() => {
// loop through all columns to inspect filters & set the query
this.updateFilters(args.columnFilters, false);
this.resetPaginationOptions();
resolve(this.buildQuery());
}, debounceTypingDelay);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,12 @@ export class GridOdataService implements BackendService {
}

const promise = new Promise<string>((resolve, reject) => {
// loop through all columns to inspect filters & set the query
this.updateFilters(args.columnFilters);

// reset Pagination, then build the OData query which we will use in the WebAPI callback
// wait a minimum user typing inactivity before processing any query
clearTimeout(timer);
timer = setTimeout(() => {
// loop through all columns to inspect filters & set the query
this.updateFilters(args.columnFilters);
this.resetPaginationOptions();
resolve(this.odataService.buildQuery());
}, debounceTypingDelay);
Expand Down

0 comments on commit a25147d

Please sign in to comment.