From 066108457259d6a2b8f6311629da003159434274 Mon Sep 17 00:00:00 2001 From: Dario Del Piano Date: Fri, 20 Sep 2019 16:34:37 +0100 Subject: [PATCH] Fixed seach for focus term menu item population on second visit --- components/interface/FocusTerm.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/components/interface/FocusTerm.js b/components/interface/FocusTerm.js index 438ef1b84..49f2de520 100644 --- a/components/interface/FocusTerm.js +++ b/components/interface/FocusTerm.js @@ -151,6 +151,23 @@ export default class FocusTerm extends React.Component { ); } }); + } else { + var variable = GEPPETTO.ModelFactory.getTopLevelVariablesById([classId])[0] + var allQueries = GEPPETTO.ModelFactory.getMatchingQueries(variable.getType(), undefined); + if (allQueries.length > 0) { + focusSubMenu.push( + { + label: "Search for", + icon: "", + action: "", + position: "left", + dynamicListInjector: { + handlerAction: "subMenuGrouping", + parameters: [{ variable: variable, allQueries: allQueries }] + } + } + ); + } } } }