Sha256: 722d00e095b360bb49a242f3968307e700e9aa2edd367ca937ee7371275b865e
Contents?: true
Size: 1.1 KB
Versions: 5
Compression:
Stored size: 1.1 KB
Contents
<%= edit_field_wrapper field: @field, index: @index, form: @form, resource: @resource, displayed_in_modal: @displayed_in_modal do %> <div data-controller="tags-field"> <%# dummy field %> <%= text_field_tag "#{@field.id}-dummy", '', class: helpers.input_classes('w-full', has_error: @field.model_errors.include?(@field.id)), placeholder: @field.placeholder, disabled: @field.readonly, value: '', data: { 'tags-field-target': 'fakeInput', } %> <%# real field %> <%= @form.text_field @field.id, class: helpers.input_classes('hidden w-full', has_error: @field.model_errors.include?(@field.id)), placeholder: @field.placeholder, disabled: @field.readonly, value: @field.field_value.to_json, data: { 'tags-field-target': 'input', 'whitelist-items': @field.suggestions.to_json, 'disallowed-items': @field.disallowed.to_json, 'enforce-suggestions': @field.enforce_suggestions ? 1 : 0, 'delimiters': @field.delimiters, 'close-on-select': @field.close_on_select ? 1 : 0, } %> </div> <% end %>
Version data entries
5 entries across 5 versions & 1 rubygems