Browse Source

[editor] Prevent fetching more streaming result on scroll to end in the ResultTable component

Johan Åhlén 4 years ago
parent
commit
dbd9111d4c

+ 1 - 1
desktop/core/src/desktop/js/apps/editor/components/ExecuteButton.vue

@@ -56,7 +56,7 @@
 
 
 <script lang="ts">
 <script lang="ts">
   import { EXECUTABLE_UPDATED_TOPIC, ExecutableUpdatedEvent } from 'apps/editor/execution/events';
   import { EXECUTABLE_UPDATED_TOPIC, ExecutableUpdatedEvent } from 'apps/editor/execution/events';
-  import { defineComponent, nextTick, PropType, ref, toRefs, watch } from 'vue';
+  import { defineComponent, PropType, ref, toRefs, watch } from 'vue';
 
 
   import SqlExecutable from 'apps/editor/execution/sqlExecutable';
   import SqlExecutable from 'apps/editor/execution/sqlExecutable';
   import HueButton from 'components/HueButton.vue';
   import HueButton from 'components/HueButton.vue';

+ 3 - 0
desktop/core/src/desktop/js/apps/editor/components/result/ResultTable.vue

@@ -201,6 +201,9 @@
       };
       };
 
 
       const onScrollToEnd = async (): Promise<void> => {
       const onScrollToEnd = async (): Promise<void> => {
+        if (streaming.value) {
+          return;
+        }
         if (hasMore.value && !grayedOut.value && executable.value && executable.value.result) {
         if (hasMore.value && !grayedOut.value && executable.value && executable.value.result) {
           grayedOut.value = true;
           grayedOut.value = true;
           try {
           try {