Skip to content

Commit

Permalink
Mobile/Desktop view fix for PAGE_SUB_NAVIGATION_SELECT Hooks
Browse files Browse the repository at this point in the history
Wrap PAGE_SUB_NAVIGATION_SELECT_BEFORE & PAGE_SUB_NAVIGATION_SELECT_AFTER with div's and apply the same class md:hidden that the select has. This stops the SELECT hooks being visible when the SELECT itself is not.
  • Loading branch information
FortuneV13 committed Oct 21, 2024
1 parent e4132b6 commit 1e65d98
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/panels/resources/views/components/page/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,18 @@
])
>
@if ($subNavigation)
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_SUB_NAVIGATION_SELECT_BEFORE, scopes: $this->getRenderHookScopes()) }}
<div class="md:hidden">
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_SUB_NAVIGATION_SELECT_BEFORE, scopes: $this->getRenderHookScopes()) }}
</div>

<x-filament-panels::page.sub-navigation.select
:navigation="$subNavigation"
/>

{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_SUB_NAVIGATION_SELECT_AFTER, scopes: $this->getRenderHookScopes()) }}

<div class="md:hidden">
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_SUB_NAVIGATION_SELECT_AFTER, scopes: $this->getRenderHookScopes()) }}
</div>

@if ($subNavigationPosition === SubNavigationPosition::Start)
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\View\PanelsRenderHook::PAGE_SUB_NAVIGATION_START_BEFORE, scopes: $this->getRenderHookScopes()) }}

Expand Down

0 comments on commit 1e65d98

Please sign in to comment.