Sha256: fa979e5f26ec8d7ad2926209ea6ef576bb84a31b16e2127fd8d69696d5b761ff

Contents?: true

Size: 1.13 KB

Versions: 20

Compression:

Stored size: 1.13 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: classes("w-full"),
      data: {
        'tags-field-target': 'fakeInput',
      },
      disabled: @field.is_readonly?,
      placeholder: @field.placeholder,
      style: @field.get_html(:style, view: view, element: :input),
      value: ''
    %>
    <%# real field %>
    <%= @form.text_field @field.id,
      class: classes("hidden w-full"),
      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,
      },
      disabled: @field.is_readonly?,
      placeholder: @field.placeholder,
      style: @field.get_html(:style, view: view, element: :input),
      value: @field.field_value.to_json
    %>
  </div>
<% end %>

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
avo-2.14.3.pre.7.polytranslations1 app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.14.3.pre.6.nosprockets app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.14.3.pre.5.nosprockets app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.14.3.pre.4.tosqlfix app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.14.3.pre.3.jsbundling app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.14.3.pre.2.tailwindcss app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.14.2 app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.14.2.pre.1 app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.14.1 app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.14.1.pre.1 app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.14.0 app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.13.6.pre.2 app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.13.6.pre.1 app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.13.5.pre.2 app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.13.5.pre.1 app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.13.4.pre.1 app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.13.3.pre.4 app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.13.3.pre.3 app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.13.3.pre.2 app/components/avo/fields/tags_field/edit_component.html.erb
avo-2.13.3.pre.1 app/components/avo/fields/tags_field/edit_component.html.erb