Skip to content

Commit 0513102

Browse files
committed
feat(pat-sortable): Add the sortable-item class to each sortable element.
The current situation requires the integrator to add the `sortable-item` class on all sortables manually. If that is not done there can be styling problems like a missing insert marker which makes it hard to use the pattern. As the pattern already defines what should be a sortable it we also let the pattern assign the class "sortable-item".
1 parent fe90c73 commit 0513102

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pat/sortable/sortable.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export default Base.extend({
4141
this.$sortables = this.$el.children().filter(this.options.selector);
4242
this.$sortables.each(function (idx) {
4343
$(this).data("patterns.sortable", { position: idx });
44+
// Add `.sortable-item` class to each sortable.
45+
this.classList.add("sortable-item");
4446
});
4547
return this;
4648
},

0 commit comments

Comments
 (0)