From de7b449279471d48f6127f5a3bbbf0bbeb18809a Mon Sep 17 00:00:00 2001 From: Joseph Sugamele Date: Mon, 11 Apr 2022 11:49:09 -0400 Subject: [PATCH] User can now add filters in the config section --- src/DataTableComponent.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DataTableComponent.php b/src/DataTableComponent.php index c1dca6985..85a6f985c 100644 --- a/src/DataTableComponent.php +++ b/src/DataTableComponent.php @@ -49,6 +49,9 @@ public function boot(): void 'filters' => $this->{$this->tableName}['filters'] ?? [], ]; + // Set the filter defaults based on the filter type + $this->setFilterDefaults(); + // Set the user defined columns to work with $this->setColumns(); @@ -59,9 +62,6 @@ public function boot(): void if (! $this->hasPrimaryKey()) { throw new DataTableConfigurationException('You must set a primary key using setPrimaryKey in the configure method.'); } - - // Set the filter defaults based on the filter type - $this->setFilterDefaults(); } /**