Skip to content

.sortable-item class is not applied to updated rows within ember-table #514

@rreckonerr

Description

@rreckonerr

Describe the bug
I'm using ember-sortable v4.0.3 to reorder the rows within ember-table v5.0.0. Initially, when rows are rendered, .sortable-item class is applied to the rows, but after updating the array according to the reordered data .sortable-item class is not re-applied.

After the reorder is done, sortable-item modifier update is not triggered.

<EmberTable
  as |et|
>
  <et.body
    {{sortable-group onChange=this.reorderTiles}}
    as |b|
  >
    <b.row
      @rows={{@data}}
      {{sortable-item model=b.rowValue}}
    >
    </b.row>
  </et.body>
</EmberTable>

Screenshots
image
In the screenshot above you can see that 1) first has .sortable-item class that was applied initially, no sorting was done, and 2) second was reordered, .sortable-class is missing.

Workaround
Manually setting the class="sortable-item" solves the issue

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