Hello! I`m trying to implement a simple autocomplete with input and datalist HTML tags. And something strange is going on here: I cannot see datalist options on the page.
<input
name="home"
value={@home}
type="text"
list = "homes"
autocomplete="off"
placeholder="Enter your address"
/>
<datalist id="homes">
<%= for place <- @homes do %>
<option value={place.title}><%= place.title %></option>
<% end %>
</datalist>
And this is handled by:
def handle_event("suggest", %{"home" => home}, socket) do
homes = Locations.get_locations(home)
{:noreply, assign(socket, homes: homes, home: home)}
end
homes variable is changing and fetching all I need, but it just does not show by datalist.