-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Actions that ->requiresConfirmation()
's notifications are run twice
#11099
Comments
So I definitely don't think this is a case of them firing twice - they fire once, but you can still see the notification from the previous request as it hasnt transitioned out yet. I think there is a slight animation issue with transitioning new stacked notifications into view that creates a double request effect, so that could be investigated. But it's definitely low priority and doesn't really affect usability. Screen.Recording.2024-01-27.at.12.02.20.mov |
I verified the existence of this issue through the use of the requiresConfirmation() function. |
To solve this problem I comment line 26 to 38 then notification started working normal without glitch effect. vendor\filament\actions\resources\views\components\modals.blade.php {{-- x-on:modal-closed.stop="
const mountedActionShouldOpenModal = {{ \Illuminate\Support\Js::from($action && $this->mountedActionShouldOpenModal()) }}
if (! mountedActionShouldOpenModal) {
return
}
if ($wire.mountedFormComponentActions.length) {
return
}
// $wire.unmountAction(false) is causing a problem.
$wire.unmountAction(false)
" --}} |
This issue is caused by notification animations being triggered by the Livewire request. It happens in:
The vertical notification animation has been broken since Livewire v3, and I haven't been able to fix it yet. Will close this issue as it's part of #7395. |
Package
filament/filament
Package Version
v3.2
Laravel Version
v10.00
Livewire Version
v3
PHP Version
PHP 8.3.0
Problem description
An action (Filament\Actions\Action) with
->requiresConfirmation()
has trigger a notification via the->action()
method causes the notification to run twice?!I have attached a video that showcases it.
2024-01-26.22-36-41.mp4
Expected behavior
To not run twice
Steps to reproduce
Just use the UserResource (edit a user) as an example. This repo is ready to run
migrate:fresh --seed
which seeds the user [email protected] with the default password.Reproduction repository
https://github.com/dissto/filament-actions-notifications-fire-twice
Relevant log output
No response
The text was updated successfully, but these errors were encountered: