Skip to content

Commit 69c6fd6

Browse files
Copilotzdrawku
andcommitted
fix: correct remote paging mode and remote filtering event in paging-remote skill
Co-authored-by: zdrawku <11193764+zdrawku@users.noreply.github.com>
1 parent cc3a1d0 commit 69c6fd6

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

  • skills
    • igniteui-angular-grid-data-operations
    • igniteui-angular-grid-paging-remote

skills/igniteui-angular-grid-data-operations/SKILL.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,8 @@ filteringLogic = FilteringLogic.And;
343343
| Event | Cancelable | Payload |
344344
|---|---|---|
345345
| `(filtering)` | Yes | `IFilteringEventArgs` — set `event.cancel = true` to prevent |
346-
| `(filteringDone)` | No | `IFilteringEventArgs` — fires after filter is applied |
346+
| `(filteringDone)` | No | `IFilteringEventArgs` — fires after a **column-level** filter is applied |
347+
| `(filteringExpressionsTreeChange)` | No | `IFilteringExpressionsTree` — fires after the **grid-level** filter tree changes (use this for remote data) |
347348

348349
```typescript
349350
onFilteringDone(event: IFilteringEventArgs) {
@@ -352,6 +353,8 @@ onFilteringDone(event: IFilteringEventArgs) {
352353
}
353354
```
354355

356+
> **Remote data note:** For remote filtering, subscribe to `(filteringExpressionsTreeChange)` instead of `(filteringDone)`. The former reflects the complete grid-level filter tree, including "clear all filters" — `filteringDone` is column-scoped and can miss global state changes.
357+
355358
### Available Filtering Operands by Data Type
356359

357360
| Operand Class | Conditions |

skills/igniteui-angular-grid-paging-remote/SKILL.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,13 @@ this.gridRef().paginator.perPage = 25;
6565
### Remote Paging
6666

6767
```typescript
68+
import { GridPagingMode } from 'igniteui-angular/grids/grid';
69+
6870
export class RemotePagingComponent {
6971
data = signal<Product[]>([]);
7072
totalCount = signal(0);
7173
perPage = signal(15);
74+
pagingMode = GridPagingMode.Remote;
7275

7376
gridRef = viewChild.required<IgxGridComponent>('grid');
7477
private dataService = inject(ProductService);
@@ -100,6 +103,7 @@ export class RemotePagingComponent {
100103
<igx-grid #grid
101104
[data]="data()"
102105
[primaryKey]="'id'"
106+
[pagingMode]="pagingMode"
103107
height="600px">
104108
<igx-column field="name"></igx-column>
105109
<igx-column field="price" dataType="number"></igx-column>
@@ -185,7 +189,7 @@ export class RemoteGridComponent {
185189
this.loadData(0, 15);
186190
}
187191

188-
onFilteringDone() {
192+
onFilteringExpressionsTreeChange() {
189193
this.currentFilter = this.gridRef().filteringExpressionsTree;
190194
this.loadData(0, 15);
191195
}
@@ -219,7 +223,7 @@ export class RemoteGridComponent {
219223
[filterStrategy]="noopFilter"
220224
(dataPreLoad)="onDataPreLoad($event)"
221225
(sortingDone)="onSortingDone($event)"
222-
(filteringDone)="onFilteringDone()"
226+
(filteringExpressionsTreeChange)="onFilteringExpressionsTreeChange()"
223227
height="600px">
224228

225229
<igx-column field="orderId" header="Order ID" [sortable]="true"></igx-column>
@@ -299,7 +303,7 @@ export class OrderService {
299303
2. **Use `[isLoading]`** — shows a loading indicator while data is being fetched
300304
3. **Apply `NoopSortingStrategy` and `NoopFilteringStrategy`** — prevents the grid from performing client-side sorting/filtering, so the server results are displayed as-is
301305
4. **Listen to `(dataPreLoad)`** — fires when the user scrolls and the grid needs more rows; provides `startIndex` and `chunkSize` (first `chunkSize` will be 0 — use a fallback)
302-
5. **Listen to `(sortingDone)` and `(filteringDone)`** — reset to the beginning and re-fetch with new parameters
306+
5. **Listen to `(sortingDone)` and `(filteringExpressionsTreeChange)`** — reset to the beginning and re-fetch with new parameters; `filteringExpressionsTreeChange` is the grid-level output that reflects the complete filter state (unlike the column-level `filteringDone`)
303307
6. **Track current sort/filter state** — store them so every `loadData` call includes the active criteria
304308
7. **Debounce `(dataPreLoad)`** — use `debounceTime` to avoid flooding the server during fast scrolling
305309
8. **Use `[uniqueColumnValuesStrategy]`** — when using Excel-style filtering, supply a callback to load unique column values from the server

0 commit comments

Comments
 (0)