Skip to content

Commit de7b449

Browse files
committed
User can now add filters in the config section
1 parent ee303cd commit de7b449

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/DataTableComponent.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ public function boot(): void
4949
'filters' => $this->{$this->tableName}['filters'] ?? [],
5050
];
5151

52+
// Set the filter defaults based on the filter type
53+
$this->setFilterDefaults();
54+
5255
// Set the user defined columns to work with
5356
$this->setColumns();
5457

@@ -59,9 +62,6 @@ public function boot(): void
5962
if (! $this->hasPrimaryKey()) {
6063
throw new DataTableConfigurationException('You must set a primary key using setPrimaryKey in the configure method.');
6164
}
62-
63-
// Set the filter defaults based on the filter type
64-
$this->setFilterDefaults();
6565
}
6666

6767
/**

0 commit comments

Comments
 (0)