From a609f261bdee1e52828a1e598e39ffb85155ab39 Mon Sep 17 00:00:00 2001 From: Max Marcon Date: Tue, 19 Mar 2024 09:35:50 +0100 Subject: [PATCH] update docs --- lib/live_select.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/live_select.ex b/lib/live_select.ex index 7cc5049..2258914 100644 --- a/lib/live_select.ex +++ b/lib/live_select.ex @@ -306,7 +306,7 @@ defmodule LiveSelect do We do (1) by passing a `value_mapper` assign to `LiveSelect`. This is a 1-arity function that expects the struct and maps it to the option that `LiveSelect` should use: ``` - <.live_select field={@my_form[:city_search]} value_mapper={&value_mapper/1} mode={:tags} /> + <.live_select field={@form[:city_search]} value_mapper={&value_mapper/1} mode={:tags} /> ``` ``` @@ -345,7 +345,7 @@ defmodule LiveSelect do # now we can cast the params: changeset = CitySearchForm.changeset(params) - {:noreply, assign(socket, changeset: changeset)} + {:noreply, assign(socket, form: to_form(changeset))} end ```