File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ protected function setUp(): void
24
24
$ this ->extraInputAttributes (['x-model ' => 'value ' ]);
25
25
26
26
$ this ->registerActions ([
27
- Action::make ('search ' )->action (function (SearchableInput $ component , array $ arguments ): array {
27
+ Action::make ('search ' )->action (function (SearchableInput $ component , array $ arguments ): array {
28
28
if ($ component ->isDisabled () || $ component ->isReadOnly ()) {
29
29
return [];
30
30
}
@@ -37,21 +37,21 @@ protected function setUp(): void
37
37
]);
38
38
39
39
$ results ??= collect ($ this ->getOptions ())
40
- ->filter (fn (string $ option ) => str ($ option )->contains ($ search ))
40
+ ->filter (fn (string $ option ) => str ($ option )->contains ($ search ))
41
41
->toArray ();
42
42
43
- if (collect ($ results )->every (fn ($ item ) => is_string ($ item ))) {
43
+ if (collect ($ results )->every (fn ($ item ) => is_string ($ item ))) {
44
44
$ results = collect ($ results )
45
- ->map (fn ($ item , $ key ) => [
45
+ ->map (fn ($ item , $ key ) => [
46
46
'value ' => $ key ,
47
47
'label ' => $ item ,
48
48
]);
49
49
}
50
50
51
- return $ results ;
51
+ return $ results-> toArray () ;
52
52
}),
53
53
54
- Action::make ('item_selected ' )->action (function ($ arguments ) {
54
+ Action::make ('item_selected ' )->action (function ($ arguments ) {
55
55
$ this ->evaluate ($ this ->onItemSelected , [
56
56
'item ' => $ arguments ['item ' ],
57
57
]);
You can’t perform that action at this time.
0 commit comments