Skip to content

Commit b705052

Browse files
authored
DH-11658 Don't flip card on filterset apply (#480)
1 parent 86de449 commit b705052

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

packages/dashboard-core-plugins/src/controls/input-filter/InputFilter.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,11 @@ class InputFilter extends Component {
150150

151151
setFilterState({ name, type, value, isValueShown }) {
152152
const column = name != null && type != null ? { name, type } : null;
153-
this.setState({ column, value, isValueShown });
153+
const update =
154+
isValueShown === undefined
155+
? { column, value }
156+
: { column, value, isValueShown };
157+
this.setState(update);
154158
}
155159

156160
sendUpdate() {

packages/dashboard-core-plugins/src/panels/FilterSetManagerPanel.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,11 @@ class FilterSetManagerPanel extends Component {
233233

234234
// eslint-disable-next-line class-methods-use-this
235235
restoreInputFilterState(panel, state) {
236-
log.debug('restoreInputFilterState', panel, state);
237-
panel.setPanelState(state);
236+
const inputFilterState = { ...state };
237+
// Restore state but don't flip the card
238+
delete inputFilterState.isValueShown;
239+
log.debug('restoreInputFilterState', panel, inputFilterState);
240+
panel.setPanelState(inputFilterState);
238241
}
239242

240243
render() {

0 commit comments

Comments
 (0)