Skip to content

Commit

Permalink
feat(pagination): address changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Leotheluck authored and dpellier committed Feb 2, 2024
1 parent f861003 commit e5ed5b8
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ export class OsdsPagination implements OdsPaginationAttribute, OdsPaginationEven

@Element() el!: HTMLStencilElement;

@State() itemPerPage = ODS_PAGINATION_PER_PAGE_MIN;
@State() pageList: OdsPaginationPageList = [];

private isFirstLoad: boolean = true;

@Prop({ mutable: true, reflect: true }) current: number = DEFAULT_ATTRIBUTE.current;
@Prop({ reflect: true }) totalItems?: number;
@Prop({ reflect: true }) defaultItemsPerPage: ODS_PAGINATION_PER_PAGE = DEFAULT_ATTRIBUTE.defaultItemsPerPage;
Expand All @@ -33,10 +38,6 @@ export class OsdsPagination implements OdsPaginationAttribute, OdsPaginationEven
@Prop({ reflect: true }) labelTooltipPrevious: string = DEFAULT_ATTRIBUTE.labelTooltipPrevious;
@Prop({ reflect: true }) labelTooltipNext: string = DEFAULT_ATTRIBUTE.labelTooltipNext;

@State() itemPerPage = this.defaultItemsPerPage || ODS_PAGINATION_PER_PAGE_MIN;
@State() pageList: OdsPaginationPageList = [];
@State() private isFirstLoad: boolean = true;

@Event() odsPaginationChanged!: EventEmitter<OdsPaginationChangedEventDetail>;
@Event() odsPaginationItemPerPageChanged!: EventEmitter<OdsPaginationItemPerPageChangedEventDetail>;

Expand Down

0 comments on commit e5ed5b8

Please sign in to comment.