Back to Postgresml

Template

pgml-dashboard/src/components/inputs/select/template.html

2.10.0718 B
Original Source

% use crate::components::dropdown::Dropdown; use crate::components::stimulus::stimulus_target::StimulusTarget; %>

<% let mut dropdown = Dropdown::new() .items(options) .offset(&offset) .offset_collapsed(&offset_collapsed) .text(value.clone().into()); if menu_position == "dropdown-menu-end" { dropdown = dropdown.menu_end(); } else if menu_position == "dropdown-menu-start" { dropdown = dropdown.menu_start(); } if collapsable { dropdown = dropdown.collapsable(); } if expandable { dropdown = dropdown.expandable(); } dropdown = dropdown.value_target(StimulusTarget::new().controller("inputs-select").name("value")); %> <%+ dropdown %> data-action="<%- action %> reset->inputs-select#resetSelect" />