Skip to content

Notification closes immediately when shown after previous one (duration=5000, interval=5100) #4291

@kryaksy

Description

@kryaksy

What version of rsuite are you using?

5.70.2

What version of React are you using?

18.3.1

What version of TypeScript are you using (if any)?

5.4.5

What browser are you using?

Chrome

Describe the Bug

When pushing a Notification every 5100ms with a duration of 5000ms, I expect the new notification to appear after the previous one is auto-closed. However, what happens is that every second notification is auto-closed immediately upon appearing — as if both the previous and the current one are being closed together.

Expected Behavior

Each notification should remain visible for its full duration (5000ms). When a new notification is pushed after 5100ms, the previous one should already be closed, and the new one should stay visible for another 5000ms. No notification should disappear immediately upon appearing.

To Reproduce

https://codesandbox.io/p/sandbox/rsuite-notification-autoclose-issue-9cqhgc

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions