table filter fix

This commit is contained in:
Kavalar 2024-08-29 12:41:17 +03:00
parent 5cb5ac839d
commit 1f2b93baf1

View File

@ -64,7 +64,7 @@ class ListJsonTable extends JasonTable
$this->html .= "<th>" . "ID" . "</th>"; $this->html .= "<th>" . "ID" . "</th>";
$columnKeys[] = "id"; $columnKeys[] = "id";
} }
$columnKeys = $this->getColumnKeys(); $columnKeys = array_merge($columnKeys, $this->getColumnKeys());
$columnKeys = array_merge($columnKeys, $this->getCustomColumnKeys()); $columnKeys = array_merge($columnKeys, $this->getCustomColumnKeys());
$this->getCustomHeadColumn(); $this->getCustomHeadColumn();
if ($this->showActionColumn) { if ($this->showActionColumn) {
@ -92,6 +92,9 @@ class ListJsonTable extends JasonTable
foreach ($row as $key => $cell) { foreach ($row as $key => $cell) {
if ($this->issetColumn($key) and $this->is_fillable($key)) { if ($this->issetColumn($key) and $this->is_fillable($key)) {
if($this->beforePrintCell) { if($this->beforePrintCell) {
if ($key === "id" and $cell === 0){
$cell = $this->count;
}
$cell = $this->getCustomCell($key, $cell); $cell = $this->getCustomCell($key, $cell);
} }
$this->html .= "<td style='" . $this->getStyleFromCustomColumn($key) . "'>" . $cell . "</td>"; $this->html .= "<td style='" . $this->getStyleFromCustomColumn($key) . "'>" . $cell . "</td>";