Explorar o código

support non-nested menu entries

Sven Klemm %!s(int64=8) %!d(string=hai) anos
pai
achega
12600a0e95
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      public/app/plugins/datasource/postgres/query_ctrl.ts

+ 5 - 1
public/app/plugins/datasource/postgres/query_ctrl.ts

@@ -205,7 +205,11 @@ export class PostgresQueryCtrl extends QueryCtrl {
   }
   }
 
 
   addSelectPart(selectParts, cat, subitem) {
   addSelectPart(selectParts, cat, subitem) {
-    this.queryModel.addSelectPart(selectParts, subitem.value);
+    if ("submenu" in cat) {
+      this.queryModel.addSelectPart(selectParts, subitem.value);
+    } else {
+      this.queryModel.addSelectPart(selectParts, cat.value);
+    }
     this.panelCtrl.refresh();
     this.panelCtrl.refresh();
   }
   }