Skip to content

Commit

Permalink
close other input widgets when opening a new one
Browse files Browse the repository at this point in the history
  • Loading branch information
mzimandl committed Feb 8, 2021
1 parent 4365cf4 commit 6296251
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions public/files/js/models/query/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ export abstract class QueryFormModel<T extends QueryFormModelState> extends Stat
state.historyVisible[action.payload.sourceId] =
!state.historyVisible[action.payload.sourceId];
state.suggestionsVisible[action.payload.sourceId] = null;
state.activeWidgets[action.payload.sourceId] = null;
});
}
);
Expand All @@ -374,6 +375,8 @@ export abstract class QueryFormModel<T extends QueryFormModelState> 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];
Expand Down

0 comments on commit 6296251

Please sign in to comment.