-
Notifications
You must be signed in to change notification settings - Fork 949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve documentation of LiveViewTest.form
merging behaviour
#3578
Comments
@LostKobrakai the values you pass are validated against the markup in the following way:
Some of the relevant code is here phoenix_live_view/lib/phoenix_live_view/test/client_proxy.ex Lines 1339 to 1376 in 38be0a1
Here's a playground: https://gist.github.com/SteffenDE/ccda65c6b2ea81aefae723d503610b62 If you want, feel free to open a PR to clarify this in the docs :) |
Environment
Actual behavior
Expected behavior
Have an explanation how the provided data is merged with the data on the form before being submitted. I have nested records prepared on the server side and I feared providing just a subset of those on the form command would send just the data I provided, but the data provided seems to get merged with the data present in the form. This seems to also allow just providing the value, which changed to
form/3
for updating just that part of a form without caring for other values, which can be really useful.The text was updated successfully, but these errors were encountered: