Răsfoiți Sursa

HUE-4734 [editor] Autocompleter should trigger after '.' when autocomplete as you type is enabled

Johan Ahlen 9 ani în urmă
părinte
comite
98c0722ece

+ 5 - 1
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -3110,7 +3110,7 @@
       });
 
       var $tableDropMenu = $el.next('.table-drop-menu');
-      var $identifierDropMenu = $tableDropMenu.find('.editor-drop-identifier')
+      var $identifierDropMenu = $tableDropMenu.find('.editor-drop-identifier');
 
 
       var hideDropMenu = function () {
@@ -3206,6 +3206,10 @@
             window.setTimeout(function () {
               editor.execCommand("startAutocomplete");
             }, 1);
+          } else if (/\.$/.test(editor.getTextBeforeCursor())) {
+            window.setTimeout(function () {
+              editor.execCommand("startAutocomplete");
+            }, 1);
           }
         }
         editor.session.getMode().$id = snippet.getAceMode(); // forces the id again because of Ace command internals