FilamentF
Filament15mo ago
Ashk

Navigation group translated label and sort

Hi, I have weird behavior that I can't understand at all, maybe someone here is able to explain it?

I define my navigation groups as follows

->navigationGroups([
    NavigationGroup::make(__('labels.third_parties'))
        ->collapsible(),
    NavigationGroup::make(__('labels.planning'))
        ->collapsible(),
    NavigationGroup::make(__('labels.commercial'))
        ->collapsible(),
])


The order in English is good, but in French it changes (planning and commercial inverted)

Thanks for your help!
image.png
image.png
Solution
Put it like this, you need to wrap in fn()
NavigationGroup::make()
  ->label(fn (): string => __('labels.third_parties')),
Was this page helpful?