Skip to content

Commit c550438

Browse files
authored
fixing searchable key (#656)
* fix: fixing searchable key * Fix styling --------- Co-authored-by: binaryk <[email protected]>
1 parent bbe56d8 commit c550438

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Filters/SearchablesCollection.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ public function __construct($items = [])
2828
} elseif ($searchable instanceof Filter) {
2929
// Other Filter instance - keep it
3030
$unified[] = $searchable;
31-
} elseif (is_string($searchable)) {
32-
// String column name (including string callables like "MyClass::method")
33-
$filter = new SearchableFilter;
34-
$filter->setColumn($searchable);
35-
$unified[] = $filter;
3631
} elseif (is_string($key) && ! is_numeric($key)) {
3732
// Array key is the field name
3833
$filter = new SearchableFilter;
3934
$filter->setColumn($key);
4035
$unified[] = $filter;
36+
} elseif (is_string($searchable)) {
37+
// String column name (including string callables like "MyClass::method")
38+
$filter = new SearchableFilter;
39+
$filter->setColumn($searchable);
40+
$unified[] = $filter;
4141
} elseif (is_callable($searchable)) {
4242
// Non-string callables (closures, arrays, invokables)
4343
$filter = new SearchableFilter;

0 commit comments

Comments
 (0)