From 66dee6fd065a80f1fd73dd90c8592bc5a3a9c477 Mon Sep 17 00:00:00 2001 From: andres-portainer <91705312+andres-portainer@users.noreply.github.com> Date: Tue, 15 Apr 2025 21:27:30 -0300 Subject: [PATCH] fix(codemirror): optimize the autocompletion performance R8S-294 (#650) Co-authored-by: andres-portainer --- app/react/components/CodeEditor.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/react/components/CodeEditor.tsx b/app/react/components/CodeEditor.tsx index 09cc9591a..e74a70ec9 100644 --- a/app/react/components/CodeEditor.tsx +++ b/app/react/components/CodeEditor.tsx @@ -122,6 +122,9 @@ function schemaValidationExtensions(schema: JSONSchema7) { if (Array.isArray(completions)) { return null; } + + completions.validFor = /^\w*$/; + return completions; }, ],