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

Issue when using spatie translatable #203

Open
jimiero opened this issue Apr 12, 2024 · 1 comment
Open

Issue when using spatie translatable #203

jimiero opened this issue Apr 12, 2024 · 1 comment

Comments

@jimiero
Copy link

jimiero commented Apr 12, 2024

Hello @atmonshi

I'm trying to use the navigation builder on a custom resource, but I'm having an issue

I want my resource to be translatable with spatie translatable package,

now when I use:

ViewField::make('items') ->label(__('zeus-sky::filament-navigation.attributes.items')) ->default([]) ->view('zeus::filament.navigation-builder'),

clicking on "Add item" doesn't open the modal window so I can create item

It works only if I go to my CreateResource and remove:

protected function getHeaderActions(): array { return [ Actions\LocaleSwitcher::make(), // ... ]; }

but I need that so i can switch language to translate the resource, any idea?

@jimiero
Copy link
Author

jimiero commented Apr 12, 2024

Oky I've found a way seems..

I created my custom NavigationBuilder trait and inside

protected function getActions(): array

i've added:

Actions\LocaleSwitcher::make(),

and now I get the language switcer present in my form page

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

No branches or pull requests

1 participant