jonathan_77589
jonathan_77589
FFilament
Created by jonathan_77589 on 4/9/2025 in #❓┊help
Force update to sidebar navigation
Oh, it seems like Livewire Navigate may work even if the panel is NOT in spa mode. If I add $livewire->js('Livewire.navigate(window.location.href);'); to the end of my action (with injected $livewire ) it works just as intended. Cool!
6 replies
FFilament
Created by jonathan_77589 on 4/9/2025 in #❓┊help
Force update to sidebar navigation
Okay, I guess that's not surprising since I'm sure it would have magically just worked otherwise 🙂 If I'm planning on customizing the sidebar blade to add x-sortable support, I suppose an Alpine-oriented approach might work? Or, once SPA mode is working for me (https://github.com/livewire/livewire/pull/9059) a page reload could be virtually unnoticeable.
6 replies
FFilament
Created by jonathan_77589 on 4/9/2025 in #❓┊help
Force update to sidebar navigation
My panel provider:
$panel->navigation(
function (NavigationBuilder $builder): NavigationBuilder {
return $builder->groups([
NavigationGroup::make('Dashboard')
->items(Dashboard::getNavigationItems())
->extraSidebarAttributes(['class' => 'hidden']),
NavigationGroup::make('Pinned')
->icon('heroicon-o-map-pin')
->items(PinnedNavigationItemData::collect(
data_get(
auth()->user(),
'settings.pinnedNavigationItems',
),
Collection::class,
)->map->toNavigationItem()->toArray(),
),
]);
},
);
$panel->navigation(
function (NavigationBuilder $builder): NavigationBuilder {
return $builder->groups([
NavigationGroup::make('Dashboard')
->items(Dashboard::getNavigationItems())
->extraSidebarAttributes(['class' => 'hidden']),
NavigationGroup::make('Pinned')
->icon('heroicon-o-map-pin')
->items(PinnedNavigationItemData::collect(
data_get(
auth()->user(),
'settings.pinnedNavigationItems',
),
Collection::class,
)->map->toNavigationItem()->toArray(),
),
]);
},
);
6 replies