File tree 1 file changed +6
-2
lines changed
projects/igniteui-angular/src/lib/grids/tree-grid
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -246,12 +246,16 @@ export class IgxTreeGridPagingPipe implements PipeTransform {
246
246
return collection ;
247
247
}
248
248
249
- const len = collection . length ;
249
+ const pinnedRecordsLength = this . gridAPI . grid . pinnedRecordsCount ;
250
+ let perPageAfterPinnedRecs = perPage - pinnedRecordsLength ;
251
+ perPageAfterPinnedRecs = ( perPageAfterPinnedRecs < 0 ) ? 0 : perPageAfterPinnedRecs ;
252
+
253
+ const len = collection . length - pinnedRecordsLength ;
250
254
const totalPages = Math . ceil ( len / perPage ) ;
251
255
252
256
const state = {
253
257
index : ( totalPages > 0 && page >= totalPages ) ? totalPages - 1 : page ,
254
- recordsPerPage : perPage
258
+ recordsPerPage : perPageAfterPinnedRecs
255
259
} ;
256
260
257
261
const result : ITreeGridRecord [ ] = DataUtil . page ( cloneArray ( collection ) , state ) ;
You can’t perform that action at this time.
0 commit comments