So I have this input field, using form Rails 7.0.2.3, and I'm looking forward to call a controller but this is not connecting.
<%= form_with url: "/projects/#{@project.id}", method: :get do |form| %>
<%= form.text_field :query, html5: true, input_html: { data: { controller: "flatpickr" } } %>
<%= form.submit '🔎', class: 'button' %>
<% end %>
If I put in the next way, it works, but I need it to be in the input field.
I'm guessing the problem is with input_html tag
<%= form_with url: "/projects/#{@project.id}", method: :get do |form| %>
<div data-controller="flatpickr">
<%= form.text_field :query %>
</div>
<%= form.submit '🔎', class: 'button' %>
<% end %>