views/mdc/components/select.erb in voom-presenters-0.1.13 vs views/mdc/components/select.erb in voom-presenters-0.2.0
- old
+ new
@@ -1,9 +1,13 @@
<% if comp
float_label = comp.options.select{|o| o.selected }.any?
%>
- <div class="mdc-select">
+ <div class="v-select mdc-select v-input"
+ <% if comp.tag %>
+ data-input-tag="<%= comp.tag %>"
+ <% end %>
+ <%= 'style="width: 100%;"' if comp.full_width %> <%= "#{comp.full_width}" %>>
<select id="<%= comp.id %>"
name="<%= comp.name%>"
class="mdc-select__native-control"
<%= erb(:"components/event", locals: {events: comp.events,
parent_id: comp.id}) %>>
@@ -13,11 +17,11 @@
<%= 'selected' if option.selected %>>
<%= option.text %>
</option>
<% end %>
</select>
- <div class="mdc-select__label
- <%= 'mdc-floating-label--float-above' if float_label%>"><%= comp.label %></div>
+ <label class="mdc-floating-label
+ <%= 'mdc-floating-label--float-above' if float_label%>"><%= comp.label %></label>
<div class="mdc-select__bottom-line"></div>
</div>
<%= erb :"components/tooltip", :locals => {comp: comp.tooltip, parent_id: comp.id} %>
<% end %>