-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PanelStack totally broken after 3.17.2 #3875
Comments
After tests, the problem is the PR #3787 Doing that and recompile with the version 3.22.0 works as expected public componentDidUpdate(prevProps: IPanelStackProps, _prevState: IPanelStackState, _snapshot: {}) {
super.componentDidUpdate(prevProps, _prevState, _snapshot);
// const stackLength = this.props.stack != null ? this.props.stack.length : 0;
// const prevStackLength = prevProps.stack != null ? prevProps.stack.length : 0;
//
// if (stackLength !== prevStackLength && prevProps.stack != null) {
// this.setState({
// direction: prevProps.stack.length - this.props.stack.length < 0 ? "push" : "pop",
// stack: this.props.stack.slice().reverse(),
// });
// }
if (this.props.stack !== prevProps.stack && prevProps.stack != null) {
this.setState({
direction: prevProps.stack.length - this.props.stack.length < 0 ? "push" : "pop",
stack: this.props.stack.slice().reverse(),
});
}
} |
2 tasks
I see the issue now. I guess the fix would be to always update the local stack whenever |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Steps to reproduce
The state element
this.state.panels
contains only one element2. Update
this.state.panels
keeping the sametitle
,component
(update justprops
)The PanelStack is not updated
Actual behavior
With @blueprintjs/[email protected], there is no update
Expected behavior
Same behavior of @blueprintjs/[email protected]
Possible solution
I thing PR #3787 is part of the problem, but reverse this commit is not enough
The text was updated successfully, but these errors were encountered: