From d7e9e06925a8b5c6c5ec2aebc0ad7e63a3341f36 Mon Sep 17 00:00:00 2001 From: stasbilay02 Date: Mon, 23 Dec 2024 15:24:15 +0300 Subject: [PATCH] fix filter submit button --- src/ListJsonTable.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ListJsonTable.php b/src/ListJsonTable.php index 14f1381..7555b31 100644 --- a/src/ListJsonTable.php +++ b/src/ListJsonTable.php @@ -73,8 +73,8 @@ class ListJsonTable extends JasonTable } if ($this->showFiltersRow) { $this->getFilters($columnKeys); - $this->html .= ""; } + $this->html .= ""; } public function createTbody(): void @@ -271,8 +271,10 @@ class ListJsonTable extends JasonTable private function getFilters(array $columnKeys): void { $this->html .= "
"; + $flag = false; foreach ($columnKeys as $key) { if ($this->issetFilter($key)) { + $flag = true; $filter = $this->getCurrentFilter($key); $params = [ 'param' => $filter['param'] ?? '', @@ -290,7 +292,8 @@ class ListJsonTable extends JasonTable $this->html .= ""; } } - if ($this->showActionColumn) { + if ($flag) { + $this->showActionColumn = true; $this->html .= ""; } $this->html .= "
";