Skip to content

Commit

Permalink
Adjust for Typescript issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Fitzgerald committed Dec 5, 2024
1 parent b7abe6e commit 17bad82
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/perseus-editor/src/widgets/numeric-input-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ class NumericInputEditor extends React.Component<Props, State> {
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);
};
};
Expand Down Expand Up @@ -639,7 +640,7 @@ class NumericInputEditor extends React.Component<Props, State> {
return (
<div className="perseus-input-number-editor">
<Heading
title="Common Settings"
title="General Settings"
isCollapsible={true}
isOpen={this.state.showSettings}
onToggle={this.onToggleHeading("Settings")}
Expand Down

0 comments on commit 17bad82

Please sign in to comment.