From 4be6d57d9861761f9cda1f044ba72556c69a9142 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 20 Dec 2023 16:39:52 +0000 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Gauthier Dandele <92022724+GogoVega@users.noreply.github.com> --- .../@node-red/editor-client/src/js/ui/common/typedInput.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js index ad13010fe..e9e7294e9 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js @@ -122,7 +122,8 @@ const contextAutoComplete = function(options) { const getContextKeysFromRuntime = function(scope, store, searchKey, done) { - contextKnownKeys[store] = contextKnownKeys[store] || new Set() + contextKnownKeys[scope] = contextKnownKeys[scope] || {} + contextKnownKeys[scope][store] = contextKnownKeys[scope][store] || new Set() if (searchKey.length > 0) { try { RED.utils.normalisePropertyExpression(searchKey) @@ -209,7 +210,8 @@ }); } }) - done(matches) + matches.sort(function(a, b) { return a.value.localeCompare(b.value) }); + done(matches); }) } }