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

Fixes Placement of dropdown in many scenarios #109

Closed
2 changes: 1 addition & 1 deletion resources/dist/filament-language-switch.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions resources/views/language-switch.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div>
@if ($isVisibleOutsidePanels)
<div @class([
'fls-display-on fixed w-fit flex p-4 z-50',
'fls-display-on fixed flex p-4 z-50 w-full',
'top-0' => str_contains($outsidePanelsPlacement, 'top'),
'bottom-0' => str_contains($outsidePanelsPlacement, 'bottom'),
'justify-start' => str_contains($outsidePanelsPlacement, 'left'),
Expand All @@ -31,4 +31,4 @@
@else
@include('filament-language-switch::switch')
@endif
</div>
</div>
3 changes: 1 addition & 2 deletions src/LanguageSwitch.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class LanguageSwitch extends Component

protected string $maxHeight = 'max-content';

protected Closure | string $renderHook = 'panels::global-search.after';
protected Closure | string $renderHook = 'panels::user-menu.before';

protected Closure | string | null $userPreferredLocale = null;

Expand Down Expand Up @@ -104,7 +104,6 @@ public function outsidePanelRoutes(array | Closure | null $routes = null): stati
{
$this->outsidePanelRoutes = $routes ?? [
'auth.login',
'auth.profile',
'auth.register',
];

Expand Down