diff --git a/src/ListJsonTable.php b/src/ListJsonTable.php index 38b00c9..405c696 100644 --- a/src/ListJsonTable.php +++ b/src/ListJsonTable.php @@ -64,7 +64,7 @@ class ListJsonTable extends JasonTable $this->html .= "" . "ID" . ""; $columnKeys[] = "id"; } - $columnKeys = $this->getColumnKeys(); + $columnKeys = array_merge($columnKeys, $this->getColumnKeys()); $columnKeys = array_merge($columnKeys, $this->getCustomColumnKeys()); $this->getCustomHeadColumn(); if ($this->showActionColumn) { @@ -92,6 +92,9 @@ class ListJsonTable extends JasonTable foreach ($row as $key => $cell) { if ($this->issetColumn($key) and $this->is_fillable($key)) { if($this->beforePrintCell) { + if ($key === "id" and $cell === 0){ + $cell = $this->count; + } $cell = $this->getCustomCell($key, $cell); } $this->html .= "" . $cell . "";