Open lvdhoorn opened 5 years ago
When i use Nova-belongsto-depend inside Nova Field Dependency Container the fields depended fields no longer gets filled.
The code that i am using:
Select::make('invoicing', 'invoicing')->options([ 'yes' => 'yes', 'no' => 'no', ]) ->displayUsingLabels() ->withMeta(['value' => (function(){ return $this->profitDebtorCompany ? 'yes' : 'no'; })()]) ->fillUsing(function(){}), NovaDependencyContainer::make([ NovaBelongsToDepend::make('company', 'company', 'App\Nova\Company') ->options(Company::all()) ->fillUsing(function(){}), NovaBelongsToDepend::make('debtor', 'debtor', 'App\Nova\Debtor')->optionsResolve(function ($company) { return $company->debtors()->get(['id', 'company_name', 'debtor_code']); })->dependsOn('company'), NovaBelongsToDepend::make('product', 'product', 'App\Nova\Product')->optionsResolve(function ($company) { return $company->products()->get(['id', 'product_name', 'product_code']); })->dependsOn('debtor')->hideFromIndex(), ])->dependsOn('invoicing', 'yes'),
Outside the container everthing is working fine.
I'm still facing this issue what is the state on the fix ?
When i use Nova-belongsto-depend inside Nova Field Dependency Container the fields depended fields no longer gets filled.
The code that i am using:
Outside the container everthing is working fine.