dkulyk / nova-tabs

Another Laravel Nova Tabs Package
58 stars 7 forks source link

Tabs are not rendering, all tabs files are shown in same panel #18

Closed wemersonrv closed 4 years ago

wemersonrv commented 4 years ago

Hello.

I don't know what i'm doing wrong, but here my tabs not render. See:

public function fields(Request $request)
{
    return [
        ID::make()->sortable(),

        RadioButton::make('Tipo', 'tipo')
            ->options(\App\Models\Cliente::getTipos())
            ->default('Pessoa Jurídica') // optional
            ->stack()
            ->toggle([  // optional
                'Pessoa Física' => [ 'cnpj', ],
                'Pessoa Jurídica' => [ 'cpf', 'rg', 'rg_complemento' ],
            ]),

        Text::make('Inscrição Estadual', 'ie'),

        new Tabs('Tabs', [
            'Balance' => [
                Text::make('Name')
                    ->sortable()
                    ->rules('required', 'max:255'),
                Text::make('Email')
                    ->sortable()
                    ->rules('required', 'email', 'max:255')
                    ->creationRules('unique:users,email')
                    ->updateRules('unique:users,email,{{resourceId}}')
            ],
            'Address Info' => [
                Text::make('Address')
                    ->sortable()
                    ->rules('required', 'max:255'),
            ],
            'Other Info' => [
                Text::make('Other')
                    ->sortable()
                    ->rules('required', 'max:255'),
            ],
        ]),
    ];
}

image

Of course, i'm using use DKulyk\Nova\Tabs;

In composer.json the package is listed as "dkulyk/nova-tabs": "^1.1",

What i'm doing wrong ?

Environment:

PHP: 7.3 Laravel: 6.3 Nova: 2.5

dkulyk commented 4 years ago

This tabs working only on details view.

wemersonrv commented 4 years ago

Ah understant. tx. my mistake!