yassilah / laravel-nova-nested-form

This package allows you to include your nested relationships' forms into a parent form.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: withoutTrashed() option is ignored

jhm-ciberman opened this issue · comments

Bug: The withoutTrashed() option is ignored inside a nested form

From inside the nested form, it always shows the "With trashed" option
image

But from the default create resource screen, the "With trashed" option is now shown.
image

In my Recipe Nova resource I have

NestedForm::make('Medications', 'items', 'App\Nova\RecipeItem')

And then in my App\Nova\RecipeItem Resource:

    public function fields(Request $request)
    {
        return [
            ID::make()->hideFromDetail()->hideFromIndex(),

            BelongsTo::make('Recipe', 'recipe', 'App\Nova\Recipe'),

            BelongsTo::make('Medication', 'medication', 'App\Nova\Medication')
                ->searchable()
                ->withoutTrashed(),

            Text::make('Notes'),
        ];
    }

It is a front end problem as I see. Not something related to the backend. The information of the field is transferred correctly.
image