eminiarts / nova-tabs

Laravel Nova Tabs Package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom resource tool does not display other tabs

jaspercjc opened this issue · comments

I have encountered a problem when displaying a resource tool in tabs.
If I place the resource tool on the first tab, It does not show the other tabs but it works fine if it is not in the first tab.

Code in the resource:

public function fields(NovaRequest $request)
    {
        return [
            Text::make('Name')->sortable()->onlyOnIndex(),

            Tabs::make(__('Catalogue: '.$this->name), [
                Tab::make('Settings', [
                    CatalogueSettings::make()->settings($this->settings), //custom resource tool
                ]),
                Tab::make('Products', [
                    HasMany::make('Products', 'catalogueProducts', 'App\Nova\CatalogueProduct'),
                ]),
                Tab::make('Collections', [
                    HasMany::make('Collections', 'catalogueCollections', 'App\Nova\CatalogueCollection'),
                ]),
            ])->withToolbar(),        
        ];
    }

Result:
image

But if I put it on the second tab for example:

Tabs::make(__('Catalogue: '.$this->name), [
                Tab::make('Products', [
                    HasMany::make('Products', 'catalogueProducts', 'App\Nova\CatalogueProduct'),
                ]),
                Tab::make('Settings', [
                    CatalogueSettings::make()->settings($this->settings), //custom resource tool
                ]),
                Tab::make('Collections', [
                    HasMany::make('Collections', 'catalogueCollections', 'App\Nova\CatalogueCollection'),
                ]),
            ])->withToolbar(), 

Result:
image

I have tried creating it using Panel but I got the same result

new Panel('Settings', [
     CatalogueSettings::make()->settings($this->settings),
])