Skip to content

Commit 42a3be4

Browse files
authored
end search action (#1397)
1 parent ee7e83e commit 42a3be4

File tree

1 file changed

+8
-6
lines changed
  • pgml-dashboard/src/components/inputs/text/search/search

1 file changed

+8
-6
lines changed

pgml-dashboard/src/components/inputs/text/search/search/mod.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff 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

6365
component!(Search);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy