Sha256: e9f1c5b73fa7279250f11e339499d307ef77c79370079602f31543e04179298a

Contents?: true

Size: 1.4 KB

Versions: 19

Compression:

Stored size: 1.4 KB

Contents

<%= field_wrapper(**field_wrapper_args, data: {
      controller: "tags-field",
      tags_field_mode_value: @field.mode,
      tags_field_whitelist_items_value: @field.whitelist_items,
      tags_field_disallowed_items_value: @field.disallowed.to_json,
      tags_field_enforce_suggestions_value: @field.enforce_suggestions,
      tags_field_suggestions_max_items_value: @field.suggestions_max_items,
      tags_field_close_on_select_value: @field.close_on_select,
      tags_field_delimiters_value: @field.delimiters,
      tags_field_fetch_values_from_value: @field.fetch_values_from,
    }) do %>
    <%# We use a dummy field so the back action from Turbo does not brake the field %>
    <%# dummy field %>
    <%= text_field_tag "#{@field.id}-dummy", '',
      class: classes("w-full"),
      data: {
        tags_field_target: :fakeInput,
      },
      disabled: disabled?,
      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 !py-0 min-h-10 items-center border-primary-500 focus-within:border-primary-500"),
      data: {
        tags_field_target: :input,
      },
      disabled: disabled?,
      placeholder: @field.placeholder,
      style: @field.get_html(:style, view: view, element: :input),
      value: @field.field_value.to_json
    %>
<% end %>

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
avo-3.18.1 app/components/avo/fields/tags_field/edit_component.html.erb
avo-3.18.0 app/components/avo/fields/tags_field/edit_component.html.erb
avo-3.17.9.beta2 app/components/avo/fields/tags_field/edit_component.html.erb
avo-3.17.9.beta1 app/components/avo/fields/tags_field/edit_component.html.erb
avo-3.17.9 app/components/avo/fields/tags_field/edit_component.html.erb
avo-3.17.8 app/components/avo/fields/tags_field/edit_component.html.erb
avo-3.17.7 app/components/avo/fields/tags_field/edit_component.html.erb
avo-3.17.6 app/components/avo/fields/tags_field/edit_component.html.erb
avo-3.17.5 app/components/avo/fields/tags_field/edit_component.html.erb
avo-3.17.4 app/components/avo/fields/tags_field/edit_component.html.erb
avo-3.17.3 app/components/avo/fields/tags_field/edit_component.html.erb
avo-3.17.2 app/components/avo/fields/tags_field/edit_component.html.erb
avo-3.17.1 app/components/avo/fields/tags_field/edit_component.html.erb
avo-3.17.0 app/components/avo/fields/tags_field/edit_component.html.erb
avo-3.16.6 app/components/avo/fields/tags_field/edit_component.html.erb
avo-3.16.5 app/components/avo/fields/tags_field/edit_component.html.erb
avo-3.16.4 app/components/avo/fields/tags_field/edit_component.html.erb
avo-3.16.3 app/components/avo/fields/tags_field/edit_component.html.erb
avo-3.16.2 app/components/avo/fields/tags_field/edit_component.html.erb