File tree Expand file tree Collapse file tree 3 files changed +3
-12
lines changed
pgml-dashboard/src/components
inputs/text/search/search Expand file tree Collapse file tree 3 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ pub struct Dropdown {
7272 /// Position of the dropdown menu.
7373 offset : String ,
7474
75- /// Whether or not the dropdown responds to horizontal collapse, i.e. in product left nav .
75+ /// Whether or not the dropdown is collapsable .
7676 collapsable : bool ,
7777 offset_collapsed : String ,
7878
Original file line number Diff line number Diff line change @@ -30,11 +30,4 @@ export default class extends Controller {
3030 search ( id , url ) {
3131 this . element . querySelector ( `turbo-frame[id=${ id } ]` ) . src = url ;
3232 }
33-
34- // Hide the dropdown if the user clicks outside of it.
35- hideDropdown ( e ) {
36- if ( ! this . element . contains ( e . target ) ) {
37- this . endSearch ( ) ;
38- }
39- }
4033}
Original file line number Diff line number Diff line change 11< %
22 use crate::components::Dropdown;
3- use crate::components::stimulus::stimulus_action::{StimulusAction, StimulusEvents};
4-
53%>
64< div data-controller ="inputs-text-search-search "
75 data-search-frame-id ="<%= id %> "
86 data-search-frame-url ="<%= search_url %> "
9- data-action ='click@document->inputs-text-search-search#hideDropdown '>
10-
7+ >
118 < %+ input %>
129
1310 < %+ Dropdown::new_no_button()
1411 .frame(id, search_url.as_str())
12+ .collapsable()
1513 %>
1614</ div >
You can’t perform that action at this time.
0 commit comments