mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
feat: optimize sidebar and datatable expandable rows.
This commit is contained in:
@@ -122,7 +122,7 @@ export default class MenuItem extends AbstractPureComponent2 {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
isCollapseActive: false,
|
||||
isCollapseActive: this.props.callapseActive || false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -193,6 +193,13 @@ export default class MenuItem extends AbstractPureComponent2 {
|
||||
}</li>;
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps){
|
||||
if(nextProps.callapseActive!==this.props.callapseActive){
|
||||
//Perform some operation
|
||||
this.setState({ isCollapseActive: nextProps.callapseActive });
|
||||
}
|
||||
}
|
||||
|
||||
maybeRenderLabel(labelElement) {
|
||||
const { label, labelClassName } = this.props;
|
||||
if (label == null && labelElement == null) {
|
||||
|
||||
Reference in New Issue
Block a user