Skip to content

Commit

Permalink
CategoryTreeSorting.init jquery UI performance (#3013)
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmannmartin authored Feb 14, 2024
2 parents 1f63af4 + 85b13b1 commit 34deaad
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions assets/js/admin/components/CategoryTreeSorting.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ export default class CategoryTreeSorting {
this.$rootTree = $rootTree;
this.$saveButton = $saveButton;

$.mjs.nestedSortable.prototype._setHandleClassName = function () {
this._removeClass(this.element.find('.ui-sortable-handle'), 'ui-sortable-handle');
$.each(this.items, function () {
(this.instance.options.handle
? this.item.find(this.instance.options.handle)
: this.item
).addClass('ui-sortable-handle');
});
};

const _this = this;
this.$rootTree.nestedSortable({
listType: 'ul',
Expand Down

0 comments on commit 34deaad

Please sign in to comment.