conditional-container icon indicating copy to clipboard operation
conditional-container copied to clipboard

Bug with Boolean Field inside Conditional Container

Open Lednerb opened this issue 3 years ago • 0 comments

I've just discovered a strange bug with the latest update of this package (affecting v.1.4.3) causing Boolean fields inside the container not to work any more.

Attached you find a short screen cast that demonstrates the behaviour:

  • The first Boolean field is the trigger for the Conditional Container
  • The second one does not update

bug-conditionalContainer

I'm using Nova v3.32.0

Version 1.4.2 of this package works fine, so if somebody has the same issue the best fit at the moment would be to downgrade until an update will fix the issue.


Here is my Nova field list:

Boolean::make(__('Is task'), 'is_task')
    ->hideFromIndex(),

ConditionalContainer::make([
    Boolean::make(__('Is finished'), 'is_finished')
        ->showOnDetail()
        ->showOnUpdating()
        ->hideFromIndex()
        ->hideWhenCreating(),

    Date::make(__('Task due at'), 'expiration_date')
        ->firstDayOfWeek(1)
        ->format('DD.MM.YYYY'),

    BelongsTo::make(__('Assigned User'), 'assignedUser', 'App\Nova\User')
        ->default(auth()->user()->id)
        ->rules(['required_if:is_task,1'])
        ->nullable(),
])->if('is_task truthy true'),

Lednerb avatar May 31 '22 18:05 Lednerb