Skip to content

Commit

Permalink
fixed issue while seaching for number 0
Browse files Browse the repository at this point in the history
  • Loading branch information
emagombe committed Oct 2, 2020
1 parent 315b19e commit 1f5bffd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DataTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ private function search_column($result) {
/* Check if there is search values */
$has_search_values = false;
foreach($params["columns"] as $column) {
if($column["searchable"] == "true" && isset($column["search"]["value"]) && $column["search"]["value"]) {
if($column["searchable"] == "true" && isset($column["search"]["value"]) && $column["search"]["value"] != "") {
$has_search_values = true;
break;
}
Expand All @@ -252,7 +252,7 @@ private function search_column($result) {
$found = false;
foreach($params["columns"] as $column) {
if($column["searchable"] == "true" && isset($row[$column["data"]]) && $row[$column["data"]]) {
if($column["search"]["value"]) {
if($column["search"]["value"] != "") {
if(strpos($row[$column["data"]], $column["search"]["value"]) !== false) {
$found = true;
} else {
Expand Down

0 comments on commit 1f5bffd

Please sign in to comment.