- 
                Notifications
    You must be signed in to change notification settings 
- Fork 534
Closed
Labels
reactRelated to the react adapterRelated to the react adapter
Description
Versions:
- @inertiajs/inertiaversion: 0.11.0
- @inertiajs/inertia-reactversion: 0.8.0
Describe the problem:
The transform function of the form helper does not work.
Steps to reproduce:
const { data, setData, transform, post } = useForm({
        status: 'default',
        foo: 'bar',
    })
function handleDraft(event) {
        event.preventDefault()
        transform(data => ({ ...data, status: 'draft' }))
        post('/test')
 }
function handleSave(event) {
        event.preventDefault()
        transform(data => ({ ...data, status: 'open' }))
        post('/test')
}Route::post('/test', function (Request $request) {
    return dd($request->all());
});In both cases (handleSave or handleDraft called) the result from the laravel controller is:
^ array:2 [[▼]()
  "status" => "default"
  "foo" => "bar"
]Jamesking56, aadrian and salim-m
Metadata
Metadata
Assignees
Labels
reactRelated to the react adapterRelated to the react adapter