Etemplate: Limit sortable to just the grid's immediate rows, excluding rows in nested grids

This commit is contained in:
nathangray 2020-11-10 13:41:24 -07:00
parent b4869aa2a1
commit eb7a03b191
2 changed files with 2 additions and 2 deletions

View File

@ -707,7 +707,7 @@ var et2_grid = /** @class */ (function (_super) {
// Set up sortable
$node.sortable({
// Header does not participate in sorting
items: "tr:not(.th)",
items: "> tbody > tr:not(.th)",
distance: 15,
cancel: this.options.sortable_cancel,
placeholder: this.options.sortable_placeholder,

View File

@ -965,7 +965,7 @@ export class et2_grid extends et2_DOMWidget implements et2_IDetachedDOM, et2_IAl
// Set up sortable
$node.sortable({
// Header does not participate in sorting
items: "tr:not(.th)",
items: "> tbody > tr:not(.th)",
distance: 15,
cancel: this.options.sortable_cancel,
placeholder: this.options.sortable_placeholder,