Skip to content

AnimatePresence doesn't catch up with multiple deletes in a row #1534

@XiupengMa

Description

@XiupengMa

I have a list of items that each of them has an exit animation. I have another button that can randomly delete an item from the list. if I quickly click the button for multiple times (i.e. faster than the animation duration), I saw the deleted items are no longer visible but their original space was still taken.

Demo: https://codesandbox.io/s/adoring-rubin-hsxcfh?file=/src/App.ts

see box 0 and 7 are removed but their space is still taken:

Screen Shot 2022-05-13 at 10 03 23 PM

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