laravel / nova-issues

556 stars 34 forks source link

Heading field doesn't work with DependsOn #5685

Closed Keko-94 closed 1 year ago

Keko-94 commented 1 year ago

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(); } }),

github-actions[bot] commented 1 year ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.