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 {
3333 . method ( "startSearch" )
3434 . action ( StimulusEvents :: FocusIn ) ,
3535 )
36- . input_action (
37- StimulusAction :: new ( )
38- . controller ( "inputs-text-search-search" )
39- . method ( "endSearch" )
40- . action ( StimulusEvents :: FocusOut ) ,
41- )
4236 . input_action (
4337 StimulusAction :: new ( )
4438 . controller ( "inputs-text-search-search" )
@@ -58,6 +52,14 @@ impl Search {
5852 self . input = input;
5953 self
6054 }
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+ }
6163}
6264
6365component ! ( Search ) ;
You can’t perform that action at this time.
0 commit comments