render cell only if width specified

pull/217/head
Pete Matsyburka 2 years ago
parent 79f97d5555
commit 496f6c706b

@ -22,7 +22,7 @@
<%= svg_icon('check', class: "aspect-square #{area['w'] > area['h'] ? '!w-auto !h-full' : '!w-full !h-auto'}") %> <%= svg_icon('check', class: "aspect-square #{area['w'] > area['h'] ? '!w-auto !h-full' : '!w-full !h-auto'}") %>
</div> </div>
<% end %> <% end %>
<% elsif field['type'] == 'cells' %> <% elsif field['type'] == 'cells' && area['cell_w'] %>
<% cell_width = area['cell_w'] / area['w'] * 100 %> <% cell_width = area['cell_w'] / area['w'] * 100 %>
<div class="w-full flex items-center"> <div class="w-full flex items-center">
<% (0..(area['w'] / area['cell_w']).ceil).each do |index| %> <% (0..(area['w'] / area['cell_w']).ceil).each do |index| %>

Loading…
Cancel
Save