Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rreckonerr opened this issue Apr 19, 2023 · 0 comments
Open

Comments

@rreckonerr
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant