perf: new date picker and add purecomponent to more things

This commit is contained in:
David Ralph
2021-07-10 21:59:53 +01:00
parent ff3e2caf49
commit a01d778f65
9 changed files with 50 additions and 19 deletions

View File

@@ -92,4 +92,4 @@ function Tab(props) {
);
}
export default React.memo(Tab);
export default React.memo(Tab);

View File

@@ -42,7 +42,7 @@ export default class Tabs extends React.PureComponent {
{this.props.children.map((tab, index) => (
<Tab
currentTab={this.state.currentTab}
key={tab.props.label || index}
key={index}
label={tab.props.label}
onClick={(nextTab) => this.onClick(nextTab, tab.props.name)}
navbar={this.props.navbar || false}