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

Fix loss of parent slug #162

Merged
merged 1 commit into from
Feb 9, 2022
Merged

Fix loss of parent slug #162

merged 1 commit into from
Feb 9, 2022

Conversation

alexrififi
Copy link
Contributor

In case of using a third-party field inherited from Illuminate\Http\Resources\MergeValue the Tab is losing slug.

Example

We used naoray/nova-json

// in app/Nova/Resource.php

use Eminiarts\Tabs\Tabs;
use Eminiarts\Tabs\Tab;
use Naoray\NovaJson\JSON;

public function fields()
{
    return [
        Tabs::make('Tabs', [
            Tab::make('Settings', [
                JSON::make('Some Json Column Name', [
                    Text::make('First Field'),
                    Text::make('Second Field'),
                    Text::make('Third Field'),
                ]);
            ])->name('tab-slug'),
        ]),
    ];
}

In this case slug of tab Settings will be settings, not tab-slug.
Kind of weird.

This PR fixes this situation.

@RVxLab RVxLab merged commit 31c3a74 into eminiarts:master Feb 9, 2022
@RVxLab
Copy link
Collaborator

RVxLab commented Feb 9, 2022

Sorry I merged this so late.

Thank you for providing a fix!

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

Successfully merging this pull request may close these issues.

None yet

2 participants