diff --git a/src/components/pagination/bl-pagination.ts b/src/components/pagination/bl-pagination.ts index 380a8637..90a7119d 100644 --- a/src/components/pagination/bl-pagination.ts +++ b/src/components/pagination/bl-pagination.ts @@ -89,7 +89,11 @@ export default class BlPagination extends LitElement { /** * Fires when the current page changes */ - @event('bl-change') private onChange: EventDispatcher<{ selectedPage: number; prevPage: number; itemsPerPage: number }>; + @event('bl-change') private onChange: EventDispatcher<{ + selectedPage: number; + prevPage: number; + itemsPerPage: number; + }>; connectedCallback() { super.connectedCallback(); @@ -111,6 +115,9 @@ export default class BlPagination extends LitElement { changedProperties.has('totalItems') ) { this._paginate(); + } + + if (changedProperties.get('currentPage') || changedProperties.get('itemsPerPage')) { this.onChange({ selectedPage: this.currentPage, prevPage: changedProperties.get('currentPage'),