Skip to content

BelongsTo field doesn't work with dependsOnNotEmpty() #212

@jangaraev

Description

@jangaraev

Laravel: v8.83.23
Nova: v3.32.0
Package: v1.3.3

This code doesn't work:

BelongsTo::make('Plan')
    ->nullable()
    ->hideFromIndex(),

NovaDependencyContainer::make([
    DateTime::make('Ends At')
        ->format('DD MMM YYYY LT')
        ->hideFromIndex(),
])->dependsOnNotEmpty('plan'),

The Ends At field is always shown in this case, it doesn't react on changes of Plan field.

PS. if I change it to dependsOnNotEmpty() then it works fine (obviously this isn't what I want), dependent fields get hidden if I select any Plan.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions