Heading doesn't work anymore with dependsOn
Request of the dependsOn :
PATCH /nova-api/users/1/update-fields?editing=true&editMode=update&component=heading.heading-field.my_super_heading
{"undefined":"My super Heading","name":"Admins"}
This "undefined" seems to be the problem.
Detailed steps to reproduce the issue on a fresh Nova installation:
On a fresh Nova install :
Add a Heading field in app/Nova/User.php like that :
Heading::make('My super Heading') ->dependsOn('name', function (Heading $field, NovaRequest $request, FormData $formData) { if ($formData->name === 'Test') { $field->hide(); } else { $field->show(); } }),
Description:
Heading doesn't work anymore with dependsOn Request of the dependsOn : PATCH /nova-api/users/1/update-fields?editing=true&editMode=update&component=heading.heading-field.my_super_heading {"undefined":"My super Heading","name":"Admins"}
This "undefined" seems to be the problem.
Detailed steps to reproduce the issue on a fresh Nova installation:
On a fresh Nova install : Add a Heading field in app/Nova/User.php like that :
Heading::make('My super Heading') ->dependsOn('name', function (Heading $field, NovaRequest $request, FormData $formData) { if ($formData->name === 'Test') { $field->hide(); } else { $field->show(); } }),