filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
17.13k stars 2.69k forks source link

Actions in sidebar open modals inside of sidebar instead of center of screen #10771

Closed binaryfire closed 7 months ago

binaryfire commented 7 months ago

Package

filament/filament

Package Version

3.1.43

Laravel Version

10.3.2

Livewire Version

3.3.5

PHP Version

8.3

Problem description

Some apps have actions at the top and/or bottom of the sidebar. For example a single full-width button at the top or "Get help" and "Send feedback" icon buttons at the bottom.

However actions added to the Filament sidebar open their modals inside of sidebar instead of in the center of the screen:

image

Expected behavior

Action triggers in the sidebar should open modals in the center of the screen.

Steps to reproduce

Launch the reproduction repository, then click the button at the top of the sidebar or the icon button at the bottom of the sidebar.

Reproduction repository

https://github.com/binaryfire/filament-action-bugs

Relevant log output

No response

danharrin commented 7 months ago

This wasn't really the intention of the component, so can you please debug this and work out what's happening? Maybe the modal component needs to live in the main page content, and you just emit an event to open it from the sidebar?

binaryfire commented 7 months ago

Dispatching an event from the sidebar buttons to open a modal in the main page works. Thanks.

mwaqasiu commented 5 months ago

@binaryfire

Hey, I have the same use case. Can you please tell me how you fix it?

binaryfire commented 5 months ago

Hi @mwaqasiu. Check out the code in the reproductin repo. I updated it with a working example.