Skip to content

LocaleSelect on language click removes all fields with translatable() #141

@aivarsl

Description

@aivarsl

Description:

I'm experiencing an issue where translatable fields in Nova disappear when I change languages using the LocaleSelect field.

Environment:

Laravel Nova: 5.1.2
outl1ne/nova-translatable: 3.0.2

Nova Resource:

public function fields(NovaRequest $request): array
    {
        $fields = [
            ID::make()->sortable(),

            LocaleSelect::make(),

            Text::make('Page Title', 'title')
                ->sortable()
                ->rules('required', 'max:255')
                ->translatable(),

            Slug::make('Slug', 'slug')
                ->from('Page Title')
                ->rules('required')
                ->hideFromIndex(),

            Select::make('Type', 'type')
                ->options([
                    'homepage' => 'Homepage',
                    'about_us' => 'About Us',
                ])
                ->rules('required')
                ->displayUsingLabels()
                ->hideFromIndex(),
        ];

        return $fields;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions