Skip to content
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

Fix <CreateButton> keeps state between pages #9407

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

fzaninotto
Copy link
Member

Closes #9394

@@ -43,7 +43,11 @@ const CreateButton = (props: CreateButtonProps) => {
const isSmall = useMediaQuery((theme: Theme) =>
theme.breakpoints.down('md')
);
const state = merge(scrollStates.get(String(scrollToTop)), initialState);
const state = merge(
{},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rookie mistake

@fzaninotto fzaninotto added WIP Work In Progress RFR Ready For Review and removed WIP Work In Progress labels Oct 27, 2023
@fzaninotto fzaninotto merged commit 3a5e84e into master Oct 27, 2023
11 checks passed
@fzaninotto fzaninotto deleted the fix-createbutton-state branch October 27, 2023 12:22
@fzaninotto fzaninotto added this to the 4.15.2 milestone Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using state on CreateButton will polute/break other Create components
2 participants