diff --git a/lib/ash_admin/components/resource/data_table.ex b/lib/ash_admin/components/resource/data_table.ex index 43fb1c8..4953316 100644 --- a/lib/ash_admin/components/resource/data_table.ex +++ b/lib/ash_admin/components/resource/data_table.ex @@ -203,7 +203,10 @@ defmodule AshAdmin.Components.Resource.DataTable do [] end - case AshPhoenix.Form.submit(socket.assigns.query, action_opts: action_opts) do + case AshPhoenix.Form.submit(socket.assigns.query, + action_opts: action_opts, + params: nil + ) do {:ok, data} -> assign(socket, :data, {:ok, data}) {:error, query} -> assign(socket, data: {:error, all_errors(query)}, query: query) end diff --git a/lib/ash_admin/components/resource/form.ex b/lib/ash_admin/components/resource/form.ex index f443a56..cc623ad 100644 --- a/lib/ash_admin/components/resource/form.ex +++ b/lib/ash_admin/components/resource/form.ex @@ -1657,7 +1657,7 @@ defmodule AshAdmin.Components.Resource.Form do |> assign(:form, form)} end - def handle_event("save", _, socket) do + def handle_event("save", %{"form" => form_params}, socket) do form = socket.assigns.form before_submit = fn changeset -> @@ -1666,7 +1666,11 @@ defmodule AshAdmin.Components.Resource.Form do |> Map.put(:actor, socket.assigns[:actor]) end - case AshPhoenix.Form.submit(form, before_submit: before_submit, force?: true) do + case AshPhoenix.Form.submit(form, + before_submit: before_submit, + force?: true, + params: form_params + ) do {:ok, result} -> redirect_to(socket, result) diff --git a/lib/ash_admin/components/resource/generic_action.ex b/lib/ash_admin/components/resource/generic_action.ex index 435a078..7fe7770 100644 --- a/lib/ash_admin/components/resource/generic_action.ex +++ b/lib/ash_admin/components/resource/generic_action.ex @@ -309,7 +309,7 @@ defmodule AshAdmin.Components.Resource.GenericAction do # [] # end - # case AshPhoenix.Form.submit(socket.assigns.query, action_opts: action_opts) do + # case AshPhoenix.Form.submit(socket.assigns.query, action_opts: action_opts, params: nil) do # {:ok, data} -> assign(socket, :data, {:ok, data}) # {:error, query} -> assign(socket, data: {:error, all_errors(query)}, query: query) # end