Эх сурвалжийг харах

HUE-6256 [presentation] Re-render all the snippet results in presentation mode

Enrico Berti 8 жил өмнө
parent
commit
3ed57a90c3

+ 3 - 3
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -2698,9 +2698,9 @@ var EditorViewModel = (function() {
         _notebook.type('query-' + options.editor_type);
       }
       _notebook.snippets(_newSnippets);
-      if (_newSnippets.length > 0) {
-        huePubSub.publish('editor.redraw.data', {snippet: _newSnippets[0]});
-      }
+      _newSnippets.forEach(function (snippet) {
+        huePubSub.publish('editor.redraw.data', {snippet: snippet});
+      });
     };
     self.togglePresentationMode = function() {
       if (options.editor_type != 'notebook') {