Skip to content

Cannot read properties of null (reading 'dataset') after swapping items #126

Open

Description

@zeleniucvladislav

Hi. This issue happens when swiping items and happens randomly in most cases when you add multiple items and then swap them

Image

Video

Screencast.from.2025-01-31.11-18-39.webm

Demo

To replicate this bug I used React dynamic example from here : https://github.com/TahaSh/swapy/blob/main/examples/react-dynamic/App.tsx

https://stackblitz.com/edit/vitejs-vite-uw6gr5cc?file=src%2FApp.tsx&terminal=dev

Activity

  1. zeleniucvladislav commented on Jan 31, 2025

    @zeleniucvladislav
    Author

    Also reported here : #121 (comment)

  2. caocchinh commented on Feb 20, 2025

    @caocchinh

    I have the same issue, it's more noticeable when the data in slotItemMap is huge and you swap really fast, for instance, image data URL.

  3. HectorMu commented on Mar 10, 2025

    @HectorMu

    I transformed my key into a string, I don't know why but it worked

  4. ViniciusLeviVL commented on Jun 14, 2025

    @ViniciusLeviVL

    +1

  5. alinscodes commented on Aug 29, 2025

    @alinscodes

    same here

  6. JoaoVLima commented on Sep 12, 2025

    @JoaoVLima

    same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions