filter fix
This commit is contained in:
parent
d7e9e06925
commit
8063ec0735
@ -9,6 +9,7 @@ use Itguild\Tables\ActionColumn\ViewActionColumn;
|
||||
use Itguild\Tables\Filter\InputTextFilter;
|
||||
use Itguild\Tables\traits\CreateParams;
|
||||
use JetBrains\PhpStorm\NoReturn;
|
||||
use kernel\helpers\Debug;
|
||||
|
||||
class ListJsonTable extends JasonTable
|
||||
{
|
||||
@ -18,6 +19,7 @@ class ListJsonTable extends JasonTable
|
||||
|
||||
private int $count = 0;
|
||||
private string $baseUrl;
|
||||
private string $searchPrefix;
|
||||
private array $data;
|
||||
|
||||
private bool $pagination = true;
|
||||
@ -35,6 +37,7 @@ class ListJsonTable extends JasonTable
|
||||
$this->json = $json;
|
||||
$this->data = json_decode($this->json, true);
|
||||
$this->baseUrl = $this->data['meta']['baseUrl'] ?? '';
|
||||
$this->searchPrefix = $this->data['meta']['searchPrefix'] ?? '/search';
|
||||
$this->pagination = $this->data['meta']['pagination'] ?? true;
|
||||
$this->showActionColumn = $this->data['meta']['showActionColumn'] ?? true;
|
||||
$this->showFiltersRow = $this->data['meta']['showFiltersRow'] ?? true;
|
||||
@ -270,7 +273,7 @@ class ListJsonTable extends JasonTable
|
||||
|
||||
private function getFilters(array $columnKeys): void
|
||||
{
|
||||
$this->html .= "<tr><form action='$this->baseUrl/search'>";
|
||||
$this->html .= "<tr><form action='$this->baseUrl$this->searchPrefix'>";
|
||||
$flag = false;
|
||||
foreach ($columnKeys as $key) {
|
||||
if ($this->issetFilter($key)) {
|
||||
|
Loading…
Reference in New Issue
Block a user