You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upgrading to Inertia 2.0, the value of 'note' is always the initial value, which is '' (empty string).
Same request:
array:1 [▼ // app/Http/Controllers/NoteController.php:61"note" => ""
]
Now if i change the default value inside the ref, to:
const note = ref('foo');
"foo" is posted:
array:1 [▼ // app/Http/Controllers/NoteController.php:61"note" => "foo"
]
So it seems that it never updates / binds the changes to the reference.
I've tested by changing it directly with code before submitting, but none of the changes is registered in the :data part of the component.
I can of course also hardcoded a value to the :data part, which also works.
Version:
@inertiajs/vue3
version: 2.0.0Describe the problem:
When parsing
:data
to the<Link>
component, the reactiveness of the data stops, and is not updating inside the component.Steps to reproduce:
I have this setup:
Changing the content of the textarea updates the output of
{{ note }}
correctly, but the:data
never updates accordingly.Using Inertia 1.3.0 all works as expected, and the Request for the endpoint behind 'notes.store' returns:
Upgrading to Inertia 2.0, the value of 'note' is always the initial value, which is '' (empty string).
Now if i change the default value inside the ref, to:
const note = ref('foo');
So it seems that it never updates / binds the changes to the reference.
I've tested by changing it directly with code before submitting, but none of the changes is registered in the :data part of the component.
I can of course also hardcoded a value to the :data part, which also works.
This might be the cause, as it might loose reactivity:
https://github.com/inertiajs/inertia/blob/master/packages/vue3/src/link.ts#L188
The text was updated successfully, but these errors were encountered: