Skip to content

Commit 2ba4d35

Browse files
fix: issue with supported events list resetting when modal closes
1 parent 76ede3d commit 2ba4d35

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

webapp/src/components/subscription_modal/subscription_modal.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,13 @@ export default class SubscriptionModal extends React.PureComponent {
8888
if (e && e.preventDefault) {
8989
e.preventDefault();
9090
}
91-
this.setState(initialState, this.props.close);
91+
// Preserve supportedEvents from the config, only reset form fields
92+
const {supportedEvents} = this.state;
93+
this.setState({
94+
...initialState,
95+
supportedEvents,
96+
events: supportedEvents,
97+
}, this.props.close);
9298
};
9399

94100
handleAlias = (e) => {

0 commit comments

Comments
 (0)