dcasia / conditional-container

Provides an easy way to conditionally show and hide fields in your Nova resources.
MIT License
115 stars 37 forks source link

MorphTo bug #75

Open slowdream opened 2 years ago

slowdream commented 2 years ago
            MorphTo::make('Targetable')->types([
                City::class,
            ]),
            ConditionalContainer::make([
                Select::make('type')
                        ->options([EmergencyTypes::GENERAL => EmergencyTypes::GENERAL]),
            ])
                ->if(fn() => 'targetable_type = cities OR targetable = ' . City::uriKey()), // THIS WORK

               ->if(fn() => 'targetable = ' . City::uriKey()), // THIS NOT