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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add react keys to tabs and expanders #8683

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

vdonato
Copy link
Collaborator

@vdonato vdonato commented May 16, 2024

Expanders and tabs currently drop their state when unmounted/remounted (most often due to a new
element being inserted before the expander/tabs). This PR attempts to fix this by setting react keys
so that the components are retained across rerenders and thus don't lose their state.

Note this solution currently doesn't quite work because for whatever reason react is still dropping state
every now and then 馃槙. Currently trying to figure out why this is the case.

Closes #8239

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label May 30, 2024
@vdonato vdonato removed the stale label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

st.tabs & st.expander - Improve handling of frontend state/mount
1 participant