diff --git a/packages/perseus-editor/src/widgets/numeric-input-editor.tsx b/packages/perseus-editor/src/widgets/numeric-input-editor.tsx index 33457f63e8..742cab7e5f 100644 --- a/packages/perseus-editor/src/widgets/numeric-input-editor.tsx +++ b/packages/perseus-editor/src/widgets/numeric-input-editor.tsx @@ -156,7 +156,8 @@ class NumericInputEditor extends React.Component { onToggleHeading = (accordionName: string) => { return () => { const toggleName = `show${accordionName}`; - const newState = {[toggleName]: !this.state[toggleName]}; + const newState = {...this.state}; + newState[toggleName] === !newState[toggleName]; this.setState(newState); }; }; @@ -639,7 +640,7 @@ class NumericInputEditor extends React.Component { return (