Skip to content

Commit

Permalink
Adding empty string as a value and making column search parameter opt…
Browse files Browse the repository at this point in the history
…ional in request body (#323)

Co-authored-by: Dejan Jovic <[email protected]>
  • Loading branch information
dekijovic and Dejan Jovic committed Dec 18, 2023
1 parent e6a6aa5 commit 7002e1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DataTableState.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private function handleSearch(ParameterBag $parameters): void
{
foreach ($parameters->all()['columns'] ?? [] as $key => $search) {
$column = $this->dataTable->getColumn((int) $key);
$value = $this->isInitial ? $search : $search['search']['value'];
$value = $this->isInitial ? $search : $search['search']['value'] ?? "";

if ($column->isSearchable() && ('' !== trim($value))) {
$this->setColumnSearch($column, $value);
Expand Down

0 comments on commit 7002e1e

Please sign in to comment.