It seems that LiveView sends a _target param on phx-change.
For example, when we reset forms, this is what happens:
To reset a LiveView form, you can use the standard type="reset" on a form button or input. When clicked, the form inputs will be reset to their original values. After the form is reset, a phx-change event is emitted with the _target param containing the reset name.
For these use cases, the phx-change input does not concern itself with disabling input editing while an event to the server is in flight. When a phx-change event is sent to the server, ..., then the payload is pushed to the server with a "_target" param in the root payload containing the keyspace of the input name which triggered the change event.
It seems that LiveView sends a
_target
param onphx-change
.For example, when we reset forms, this is what happens:
We also have this in the JavaScript client specifics docs:
We should update
phoenix_test
to do that too.