From 977a363f6dd294bf507cadfde0630563ee5779c7 Mon Sep 17 00:00:00 2001 From: Tutik Alexsandr Date: Wed, 11 Oct 2023 15:13:03 +0300 Subject: [PATCH] Fix filterSelector for PageSizeBehavior class --- src/behaviors/PageSizeBehavior.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/behaviors/PageSizeBehavior.php b/src/behaviors/PageSizeBehavior.php index fcf52a9..3396682 100644 --- a/src/behaviors/PageSizeBehavior.php +++ b/src/behaviors/PageSizeBehavior.php @@ -63,8 +63,8 @@ public function run(){ $owner = $this->owner; // set selector filters - $selector = ' #'.$owner->id . ' select[name="per-page"]'; - $filters = explode(',', $owner->filterSelector); + $selector = sprintf(' #%s select[name="per-page"]', $owner->id); + $filters = explode(',', (string)$owner->filterSelector); if (!in_array($selector, $filters)) { $filters[] = $selector; $owner->filterSelector = implode(',', array_filter($filters, function ($val) { @@ -91,4 +91,4 @@ public function renderPageSize() } -} \ No newline at end of file +}