alexwenzel / nova-dependency-container

A Laravel Nova field container allowing to depend on other fields values
MIT License
46 stars 33 forks source link

DependencyContainer doesnot apply the conditions on displaying action modal #15

Open ahmadmhm opened 1 year ago

ahmadmhm commented 1 year ago

Iwrtie this codes in a action class

public function fields(NovaRequest $request) { return [ Select::make(('Status'), 'insurance_policy_status') ->options([ 'no_insurance' => __('No Request Insurance'), 'in_progress' => ('In Progress Insurance'), 'rejected' => ('Rejected Insurance'), 'done' => ('Done Insurance'), ]), DependencyContainer::make([ Image::make(__('Insurance Image'), 'image') ->path('images/loads-insurance'), ])->nullable()->dependsOnNotIn('insurance_policy_status', ['no_insurance','in_progress','rejected']), ]; }

But when It shows modal, the image field is shown. It must doesnot show on modal opening

Screenshot from 2022-11-14 15-24-12 The ''تصویر بیمه نامه" field is the image that must appearing on selecting the last option in the select box.

jmverges commented 1 year ago

+1 here too