From 27684267a6b1bbbcdc7579ce0582861208985c07 Mon Sep 17 00:00:00 2001 From: Erbil Nas Date: Tue, 23 Jan 2024 11:52:57 +0300 Subject: [PATCH] fix(pagination): fix the event of the single select --- src/components/pagination/bl-pagination.test.ts | 2 +- src/components/pagination/bl-pagination.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/pagination/bl-pagination.test.ts b/src/components/pagination/bl-pagination.test.ts index d9f736d8..e886d971 100644 --- a/src/components/pagination/bl-pagination.test.ts +++ b/src/components/pagination/bl-pagination.test.ts @@ -292,7 +292,7 @@ describe("bl-pagination", () => { } const selectOptionEvent = new CustomEvent("bl-select", { - detail: [optionTwo], + detail: optionTwo, }); select?.dispatchEvent(selectOptionEvent); diff --git a/src/components/pagination/bl-pagination.ts b/src/components/pagination/bl-pagination.ts index da2c201e..a5bafaa4 100644 --- a/src/components/pagination/bl-pagination.ts +++ b/src/components/pagination/bl-pagination.ts @@ -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); }