From eb7a03b191008cd07b915ac5b8547e2d103932b6 Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 10 Nov 2020 13:41:24 -0700 Subject: [PATCH] Etemplate: Limit sortable to just the grid's immediate rows, excluding rows in nested grids --- api/js/etemplate/et2_widget_grid.js | 2 +- api/js/etemplate/et2_widget_grid.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/et2_widget_grid.js b/api/js/etemplate/et2_widget_grid.js index 115cb97998..cff55a952d 100644 --- a/api/js/etemplate/et2_widget_grid.js +++ b/api/js/etemplate/et2_widget_grid.js @@ -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, diff --git a/api/js/etemplate/et2_widget_grid.ts b/api/js/etemplate/et2_widget_grid.ts index 57698e6a69..ff96f7decb 100644 --- a/api/js/etemplate/et2_widget_grid.ts +++ b/api/js/etemplate/et2_widget_grid.ts @@ -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,