@@ -17,7 +17,7 @@ import { PaginationComponentOptions } from './pagination-component-options.model
1717import { SortDirection , SortOptions } from '../../core/cache/models/sort-options.model' ;
1818import { hasValue } from '../empty.util' ;
1919import { PaginationService } from '../../core/pagination/pagination.service' ;
20- import { map , take } from 'rxjs/operators' ;
20+ import { map , take , tap } from 'rxjs/operators' ;
2121import { RemoteData } from '../../core/data/remote-data' ;
2222import { PaginatedList } from '../../core/data/paginated-list.model' ;
2323import { ListableObject } from '../object-collection/shared/listable-object.model' ;
@@ -224,6 +224,7 @@ export class PaginationComponent implements OnDestroy, OnInit {
224224 this . id = this . paginationOptions . id || null ;
225225 this . pageSizeOptions = this . paginationOptions . pageSizeOptions ;
226226 this . currentPage$ = this . paginationService . getCurrentPagination ( this . id , this . paginationOptions ) . pipe (
227+ tap ( ( currentPagination ) => this . pageChange . emit ( currentPagination . currentPage ) ) ,
227228 map ( ( currentPagination ) => currentPagination . currentPage )
228229 ) ;
229230 this . pageSize$ = this . paginationService . getCurrentPagination ( this . id , this . paginationOptions ) . pipe (
@@ -258,6 +259,7 @@ export class PaginationComponent implements OnDestroy, OnInit {
258259 public doPageChange ( page : number ) {
259260 this . updateParams ( { page : page . toString ( ) } ) ;
260261 this . emitPaginationChange ( ) ;
262+ this . pageChange . emit ( page ) ;
261263 }
262264
263265 /**
0 commit comments