Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Ability to put an entire panel inside the DependencyContainer #160

Open
bkintanar opened this issue Mar 25, 2021 · 5 comments

Comments

@bkintanar
Copy link

I have an entire panel that its fields are all dependent to a boolean field. I want to add the entire panel inside the container so that the panel name will be hidden too, if I only add all the fields inside the panel to the container, I'm left with an empty panel with a name.

@ConnorMoodyDev
Copy link

I second this

@dkulyk
Copy link

dkulyk commented Mar 28, 2021

This is imposible. Container is a field. Field cannot contain panels.

@emjayess
Copy link

emjayess commented Mar 29, 2021

I was looking to achieve something like this also. Since the panel will always be visible, I ended up sticking in a Heading field with instruction...

    new Panel(__('Panel fields'), $this->panelFields()),
public function panelFields()
{
    $pleaseChoose = [Heading::make('Please choose a type ⤴')];

    $panelFieldsA = [
        // build panel fields
    ];

    $dependentFields = [
        NovaDependencyContainer::make( $pleaseChoose )->dependsOn('type.id', null),
        NovaDependencyContainer::make( $panelFieldsA )->dependsOn('type.id', 'A'),
    ];

    return $dependentFields;
}

@ConnorMoodyDev
Copy link

ConnorMoodyDev commented Mar 29, 2021

@dkulyk

This is imposible. Container is a field. Field cannot contain panels.

Other way around, container inside of a panel.

The panel doesn't register as empty when there is a container within it (even if said container is not visible). According to the nova docs panels are only hidden when they are empty.

@dkulyk
Copy link

dkulyk commented Mar 29, 2021

The panel doesn't register as empty when there is a container within it (even if said container is not visible). According to the nova docs panels are only hidden when they are empty.

The panel have container(as field).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants