mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-22 22:19:48 +03:00
Make JSONNestedNode fully controlled
This commit is contained in:
parent
0ae52223dc
commit
d05bd5311b
|
@ -145,14 +145,6 @@ export default class JSONNestedNode extends React.Component<Props, State> {
|
|||
this.state = getStateFromProps(props);
|
||||
}
|
||||
|
||||
static getDerivedStateFromProps(nextProps: Props, state: State): State | null {
|
||||
const nextState = getStateFromProps(nextProps);
|
||||
if (nextState.expanded !== state.expanded) {
|
||||
return nextState;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
shouldComponentUpdate(nextProps: Props, nextState: State) {
|
||||
return (
|
||||
!!Object.keys(nextProps).find(
|
||||
|
|
Loading…
Reference in New Issue
Block a user