Skip to content

Commit

Permalink
Merge pull request #3817 from mzimandl/visual-improvements
Browse files Browse the repository at this point in the history
Close other input widgets when opening a new one
  • Loading branch information
tomachalek authored Feb 8, 2021
2 parents 4365cf4 + 6296251 commit 7ad3a6e
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 7ad3a6e

Please sign in to comment.