Skip to content

[bug] Class instances are getting replaced by plain JS objects #225

Closed
@IAmJulianAcosta

Description

@IAmJulianAcosta

Describe the bug
Class instances are getting replaced by plain JS objects

To Reproduce
Steps to reproduce the behavior:

  • Use class instances as items
  • Try to reproduce them
  • The instances are now plain objects

Expected behavior
When sorting a list that has class instances as items, the instances should remain as is, not changed to generic JS objects

Information
This is required. Issues without this critical information will be closed.

Versions - Look in your package.json for this information:
react-sortable = ^6.0.3
react = ^17.0.2

Additional context
Add any other context about the problem here.

Please provide examples, screenshots or a code sandbox for faster resolution times.
Clone and run https://github.com/IAmJulianAcosta/react-sortablejs-error-demo

image

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