Skip to content

Bug: Modal with closeTimeoutMS unrecoverable with Suspense #982

Open
@h3rmanj

Description

@h3rmanj

Summary:

Passing closeTimeoutMS to an open Modal makes it unrecoverable if it's part of a render that suspends.

Steps to reproduce:

  1. Create a component that contains an open modal, and something that can suspend
  2. Suspend it after initial render
  3. Modal can't recover

Expected behavior:

Modal should be open.

Link to example of issue:

https://codesandbox.io/s/closetimeoutms-and-suspense-nfmelh?file=/src/App.tsx

Additional notes:

If the closeTimeoutMS prop is removed from the codesandbox link, everything works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions