Browse Source

added pointer to show more, reset values on new query

Patrick O'Carroll 7 years ago
parent
commit
a40314022b

+ 1 - 0
public/app/features/templating/editor_ctrl.ts

@@ -97,6 +97,7 @@ export class VariableEditorCtrl {
     };
     };
 
 
     $scope.runQuery = function() {
     $scope.runQuery = function() {
+      $scope.optionsLimit = 20;
       return variableSrv.updateOptions($scope.current).catch(err => {
       return variableSrv.updateOptions($scope.current).catch(err => {
         if (err.data && err.data.message) {
         if (err.data && err.data.message) {
           err.message = err.data.message;
           err.message = err.data.message;

+ 1 - 1
public/app/features/templating/partials/editor.html

@@ -286,7 +286,7 @@
           <span class="gf-form-label">{{option.text}}</span>
           <span class="gf-form-label">{{option.text}}</span>
         </div>
         </div>
         <div class="gf-form" ng-if= "current.options.length > optionsLimit">
         <div class="gf-form" ng-if= "current.options.length > optionsLimit">
-          <span class="gf-form-label btn-secondary" ng-click="showMoreOptions()">Show more</span>
+          <a class="gf-form-label btn-secondary" ng-click="showMoreOptions()">Show more</a>
         </div>
         </div>
 			</div>
 			</div>
 		</div>
 		</div>