Skip to content

SortableProvider doesn't like "0" as an ID #116

Open

Description

@benbriedis

I have an example here: https://stackblitz.com/edit/solidjs-templates-uekvqb
If you drag around the row with the '0' ID then a gap is not made for it in the list.
You can drop the item OK.

Activity

  1. martinpengellyphillips commented on Jul 23, 2024

    @martinpengellyphillips
    Contributor

    Thanks for the report and reproduction. I'll take a look.

  2. martinpengellyphillips commented on Jul 23, 2024

    @martinpengellyphillips
    Contributor

    From a quick look I imagine it is caused by this naive check here:

    if (dndState.active.draggableId && dndState.active.droppableId) {

    I'll fix that to be stricter (and avoid treating a 0 as a false evaluation).

  3. floratmin commented on Oct 28, 2024

    @floratmin

    From a quick look I imagine it is caused by this naive check here:

    if (dndState.active.draggableId && dndState.active.droppableId) {

    I'll fix that to be stricter (and avoid treating a 0 as a false evaluation).

    Yes this fix works.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions