Compare commits

..

No commits in common. "master" and "1.1.1" have entirely different histories.

View File

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