Sha256: 1fe32a0bc9f991552a9505e59dc98cb3704c3ebf9ce084b8f23202ce780be9a7

Contents?: true

Size: 1.11 KB

Versions: 4

Compression:

Stored size: 1.11 KB

Contents

<div data-controller="search" class="resource-search flex items-center h-full w-full" data-turbo-remove-before-cache>
  <div class="w-full hidden"
    data-search-target="autocomplete"
    data-search-resource="<%= @model_key %>"
    data-translation-keys='{"no_item_found": "<%= I18n.translate 'avo.no_item_found' %>"}'
    data-via-association="belongs_to"
  ></div>
  <div class="relative w-full" autocomplete="off">
    <%= @form.text_field @field.foreign_key,
      value: field_label,
      class: helpers.input_classes('w-full', has_error: @field.model_errors.include?(@field.id)), 'data-search-target': 'button clearValue',
      placeholder: @field.placeholder,
      disabled: true %>
    <div class="absolute top-1/2 left-auto right-3 mr-px -mt-2 cursor-pointer hidden text-gray-500"
      data-tippy="tooltip"
      data-search-target="clearButton"
      title="<%= I18n.translate 'avo.clear_value' %>"
      data-action="click->search#clearValue"
      ><%= helpers.svg 'x', class: 'h-4' %></div>
  </div>
  <%= @form.hidden_field @foreign_key, value: field_value, 'data-search-target': 'hiddenId clearValue' %>
</div>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
avo-1.21.1.pre.1 app/components/avo/fields/belongs_to_field/autocomplete_component.html.erb
avo-1.21.0 app/components/avo/fields/belongs_to_field/autocomplete_component.html.erb
avo-1.20.2.pre.2 app/components/avo/fields/belongs_to_field/autocomplete_component.html.erb
avo-1.20.2.pre.1 app/components/avo/fields/belongs_to_field/autocomplete_component.html.erb