File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
pgml-dashboard/src/components/inputs/text/search/search Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -33,12 +33,6 @@ impl Search {
33
33
. method ( "startSearch" )
34
34
. action ( StimulusEvents :: FocusIn ) ,
35
35
)
36
- . input_action (
37
- StimulusAction :: new ( )
38
- . controller ( "inputs-text-search-search" )
39
- . method ( "endSearch" )
40
- . action ( StimulusEvents :: FocusOut ) ,
41
- )
42
36
. input_action (
43
37
StimulusAction :: new ( )
44
38
. controller ( "inputs-text-search-search" )
@@ -58,6 +52,14 @@ impl Search {
58
52
self . input = input;
59
53
self
60
54
}
55
+
56
+ /// Close the dropdown whenever you want.
57
+ /// Modify the action to change the event from the default onClick.
58
+ pub fn end_search_action ( ) -> StimulusAction {
59
+ StimulusAction :: new_click ( )
60
+ . controller ( "inputs-text-search-search" )
61
+ . method ( "endSearch" )
62
+ }
61
63
}
62
64
63
65
component ! ( Search ) ;
You can’t perform that action at this time.
0 commit comments