-
Notifications
You must be signed in to change notification settings - Fork 37
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
Can't render Panel inside container #28
Comments
@noahlocke So it looks like the structure or panels and conditional containers are currently not super friendly of one another. It is not necessarily a super pretty workaround but I managed to get the panel to render correctly in the forms by using: tap(ConditionalContainer::make([
Panel::make('Panel 2', [
Text::make('some field')
]),
])->hideFromIndex()->if('type = \'true\'), function($container) {
$container->panel = 'Panel 2';
}); This forces the conditional Container to use the panel 2 instead of the main panel. Update: please note that this does not prevent the Panel's title from displaying. It just fixes the contained fields from displaying under the wrong panel. In order to hide the name, the conditional container would have to specifically be able to change the component type of the form-panel. However, Laravel Nova does not not offer the capability to change the component used for a panel. |
The above will render the fields, but not the Panel.
The text was updated successfully, but these errors were encountered: