Skip to content

Commit

Permalink
Merge pull request #777 from Trendyol/fix/776-pagination-select
Browse files Browse the repository at this point in the history
fix(pagination): fix the event of the single select
  • Loading branch information
erbilnas authored Jan 23, 2024
2 parents e032b7a + 2768426 commit 8ded452
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/pagination/bl-pagination.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ describe("bl-pagination", () => {
}

const selectOptionEvent = new CustomEvent("bl-select", {
detail: [optionTwo],
detail: optionTwo,
});

select?.dispatchEvent(selectOptionEvent);
Expand Down
2 changes: 1 addition & 1 deletion src/components/pagination/bl-pagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export default class BlPagination extends LitElement {
}

private _selectHandler(event: CustomEvent) {
this.itemsPerPage = +event?.detail[0]?.value || 100;
this.itemsPerPage = +event?.detail?.value || 100;
this._changePage(1);
}

Expand Down

0 comments on commit 8ded452

Please sign in to comment.