Skip to content

Commit 9db3bc7

Browse files
author
sgotre
authored
Allow boolean values for column[i].searchable
When dt Request is sent as application/json instead of multipart/form-data and when in ColumnDef boolean values are used the search does not work. (Angular 6 HTTPClient for example) might affect #1789
1 parent 1643ba5 commit 9db3bc7

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/Utilities/Request.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,20 @@ public function searchableColumnIndex()
154154
public function isColumnSearchable($i, $column_search = true)
155155
{
156156
if ($column_search) {
157-
return $this->request->input("columns.$i.searchable", 'true') === 'true' && $this->columnKeyword($i) != '';
157+
return
158+
(
159+
$this->request->input("columns.$i.searchable", 'true') === 'true'
160+
||
161+
$this->request->input("columns.$i.searchable", 'true') === true
162+
)
163+
&& $this->columnKeyword($i) != '';
158164
}
159165

160-
return $this->request->input("columns.$i.searchable", 'true') === 'true';
166+
return (
167+
$this->request->input("columns.$i.searchable", 'true') === 'true'
168+
||
169+
$this->request->input("columns.$i.searchable", 'true') === true
170+
);
161171
}
162172

163173
/**

0 commit comments

Comments
 (0)