fix: new_params replaced with updated changeset_params (#129)

This commit is contained in:
KingdomCoder 2024-01-17 14:09:09 +01:00 committed by GitHub
parent ae1a2d0aa2
commit 4df9a007b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1124,18 +1124,18 @@ defmodule AshPhoenix.Form do
changeset_params,
source_opts
)
|> add_errors_for_unhandled_params(new_params)
|> add_errors_for_unhandled_params(changeset_params)
end
%{
form
| source: new_source,
forms: forms,
params: new_params,
params: changeset_params,
added?: form.added?,
errors: !!opts[:errors],
submit_errors: nil,
touched_forms: touched_forms(forms, new_params, touched_forms: form.touched_forms)
touched_forms: touched_forms(forms, changeset_params, touched_forms: form.touched_forms)
}
|> set_validity()
|> set_changed?()