Browse Source

HUE-8049 [dashboard] Gridster shouldn't throw an error if trying to drop more that 4 widgets on a row

Enrico Berti 7 years ago
parent
commit
432cef4
1 changed files with 3 additions and 1 deletions
  1. 3 1
      desktop/libs/dashboard/src/dashboard/templates/common_search.mako

+ 3 - 1
desktop/libs/dashboard/src/dashboard/templates/common_search.mako

@@ -4193,7 +4193,9 @@ $(document).ready(function () {
           var siblingCounter = 0;
           for (var i = 1; i <= 12 / newOptimalWidth; i++) {
             if (i !== droppedWidgetFauxColumn) {
-              resizeAndMove(collindingWidgets[siblingCounter], newOptimalWidth, ((i - 1) * newOptimalWidth) + 1)
+              if (collindingWidgets[siblingCounter]) {
+                resizeAndMove(collindingWidgets[siblingCounter], newOptimalWidth, ((i - 1) * newOptimalWidth) + 1)
+              }
               siblingCounter++;
             }
           }