Skip to content

Commit 68fb2a6

Browse files
authored
Merge pull request #2916 from uchajk/master
fix: case insensitive starts with search #2917
2 parents 7917f7a + 608e83c commit 68fb2a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/QueryDataTable.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,14 +445,14 @@ protected function addTablePrefix($query, string $column): string
445445
*/
446446
protected function prepareKeyword(string $keyword): string
447447
{
448-
if ($this->config->isStartsWithSearch()) {
449-
return "$keyword%";
450-
}
451-
452448
if ($this->config->isCaseInsensitive()) {
453449
$keyword = Str::lower($keyword);
454450
}
455451

452+
if ($this->config->isStartsWithSearch()) {
453+
return "$keyword%";
454+
}
455+
456456
if ($this->config->isWildcard()) {
457457
$keyword = Helper::wildcardLikeString($keyword);
458458
}

0 commit comments

Comments
 (0)