From 62962510494c3d680e0795fc91029c8c6cb58ee9 Mon Sep 17 00:00:00 2001 From: Martin Zimandl Date: Mon, 8 Feb 2021 11:09:08 +0100 Subject: [PATCH] close other input widgets when opening a new one --- public/files/js/models/query/common.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/files/js/models/query/common.ts b/public/files/js/models/query/common.ts index a7f6cbe1a9..e5a45f573d 100644 --- a/public/files/js/models/query/common.ts +++ b/public/files/js/models/query/common.ts @@ -364,6 +364,7 @@ export abstract class QueryFormModel extends Stat state.historyVisible[action.payload.sourceId] = !state.historyVisible[action.payload.sourceId]; state.suggestionsVisible[action.payload.sourceId] = null; + state.activeWidgets[action.payload.sourceId] = null; }); } ); @@ -374,6 +375,8 @@ export abstract class QueryFormModel extends Stat action => { this.changeState(state => { state.suggestionsVisible[action.payload.sourceId] = action.payload.tokenIdx; + state.historyVisible[action.payload.sourceId] = null; + state.activeWidgets[action.payload.sourceId] = null; }); if (action.payload.tokenIdx !== null) { const queryObj = this.state.queries[action.payload.sourceId];