From f12d404a2b0595e880f8bda15858866f5f992355 Mon Sep 17 00:00:00 2001 From: "Arjay Q. Angeles" Date: Thu, 24 Oct 2019 11:29:57 +0800 Subject: [PATCH] Fix skipTotalRecords api not working on initial state. --- src/QueryDataTable.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/QueryDataTable.php b/src/QueryDataTable.php index 6786d315..929654e4 100644 --- a/src/QueryDataTable.php +++ b/src/QueryDataTable.php @@ -158,7 +158,9 @@ public function keepSelectBindings() public function totalCount() { if ($this->skipTotalRecords) { - return true; + $this->isFilterApplied = true; + + return 1; } return $this->totalRecords ? $this->totalRecords : $this->count();