SearchKit - Fix switching to nonexistent tab
authorcolemanw <coleman@civicrm.org>
Thu, 1 Feb 2024 02:22:49 +0000 (21:22 -0500)
committercolemanw <coleman@civicrm.org>
Thu, 1 Feb 2024 02:23:18 +0000 (21:23 -0500)
Tabs were recently renamed so this keeps up with the change.

ext/search_kit/ang/crmSearchAdmin/crmSearchAdmin.component.js

index 79fb64869bf1e992abae1395d03cf65749656583..e4969a185b27b9938797a7785827418e9eec342c 100644 (file)
       if (display.id) {
         display.trashed = !display.trashed;
         if ($scope.controls.tab === ('display_' + index) && display.trashed) {
-          $scope.selectTab('compose');
+          $scope.selectTab('for');
         } else if (!display.trashed) {
           $scope.selectTab('display_' + index);
         }
           });
         }
       } else {
-        $scope.selectTab('compose');
+        $scope.selectTab('for');
         ctrl.savedSearch.displays.splice(index, 1);
       }
     };
         ctrl.savedSearch.groups.length = 0;
       }
       if ($scope.controls.tab === 'group') {
-        $scope.selectTab('compose');
+        $scope.selectTab('for');
       }
     };