Browse Source

HUE-8171 [dashboard] Counter widget does not propose numerical function on numbers

Romain Rigaux 7 years ago
parent
commit
a7832b3010

+ 3 - 1
desktop/libs/dashboard/src/dashboard/static/dashboard/js/search.ko.js

@@ -760,7 +760,9 @@ var Collection = function (vm, collection) {
     if (! field) {
       return HIT_OPTIONS;
     } else {
-      return facet.widgetType() == 'hit-widget' ? ALPHA_HIT_COUNTER_OPTIONS : HIT_OPTIONS;
+      return facet.widgetType() == 'hit-widget' ? (
+         isNumericColumn(field.type()) ? NUMERIC_HIT_OPTIONS : ALPHA_HIT_COUNTER_OPTIONS
+      ) : HIT_OPTIONS;
     }
   };