Explorar el Código

fix: SidebarSmall button does not keep selection on reload (#4389)

- use prepared handler changeSizeHandler instead of direct setState on event
Akihiro Nakashima hace 4 años
padre
commit
faa4929ae3
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      packages/app/src/components/Sidebar/RecentChanges.jsx

+ 1 - 1
packages/app/src/components/Sidebar/RecentChanges.jsx

@@ -187,7 +187,7 @@ class RecentChanges extends React.Component {
               className="custom-control-input"
               className="custom-control-input"
               type="checkbox"
               type="checkbox"
               checked={this.state.isRecentChangesSidebarSmall}
               checked={this.state.isRecentChangesSidebarSmall}
-              onChange={e => this.setState({ isRecentChangesSidebarSmall: e.target.checked })}
+              onChange={this.changeSizeHandler}
             />
             />
             <label className="custom-control-label" htmlFor="recentChangesResize">
             <label className="custom-control-label" htmlFor="recentChangesResize">
             </label>
             </label>