瀏覽代碼

HUE-8666 [autocomplete] Fix timing issue with "... ? from table" completion

Johan Ahlen 7 年之前
父節點
當前提交
85ff344
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

+ 2 - 0
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -5858,10 +5858,12 @@
             if (questionMarkMatch && $('.ace_autocomplete:visible').length === 0) {
               editor.moveCursorTo(editor.getCursorPosition().row, editor.getCursorPosition().column - (questionMarkMatch[1].length - 1));
               editor.removeTextBeforeCursor(1);
+              huePubSub.publish('editor.refresh.statement.locations', snippet);
               window.setTimeout(function () {
                 editor.execCommand("startAutocomplete");
               }, 1);
             } else if (/\.$/.test(textBeforeCursor)) {
+              huePubSub.publish('editor.refresh.statement.locations', snippet);
               window.setTimeout(function () {
                 editor.execCommand("startAutocomplete");
               }, 1);