Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

refactor: replace LazyMonacoEditor with async MonacoEditor component and update loading fallback

Pranav Cf11c31d52369
diff --git a/packages/nc-gui/components/monaco/Editor.vue b/packages/nc-gui/components/monaco/Editor.vue
index b4a6c48fd5..8172f7a150 100644
--- a/packages/nc-gui/components/monaco/Editor.vue
+++ b/packages/nc-gui/components/monaco/Editor.vue
@@ -15,11 +15,11 @@ interface Props {
monacoCustomTheme?: any
}
-// Async setup to make this component suspensible
-const setup = async () => {
- // Initialize Monaco Editor to make this component truly async
- await initializeMonaco()
-}
+// Make this component async by awaiting Monaco initialization
+await initializeMonaco()
+
+// Add a small delay to ensure Suspense triggers even if Monaco is already initialized
+await new Promise(resolve => setTimeout(resolve, 100))
const props = withDefaults(defineProps<Props>(), {
modelValue: '',