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

Support on_change callback functions and if custom key is passed use it in session state #241

Merged
merged 4 commits into from
Dec 19, 2024

Conversation

blackary
Copy link
Collaborator

Fixes #169

This resolves the issue that the key passed in is not accessible in st.session_state, and also allows for the new (as of streamlit 1.35) functionality of having on_change callbacks on custom components.

Adds a demo page to show off the functionality.

@blackary blackary requested a review from randyzwitch December 19, 2024 15:57
Copy link
Owner

Choose a reason for hiding this comment

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

Normally, I'd say split this up...but you're basically doing this to future you 😏

@randyzwitch
Copy link
Owner

If you're confident this is doing what you want, then it's fine with me.

@randyzwitch randyzwitch merged commit 527acd7 into master Dec 19, 2024
6 checks passed
@randyzwitch randyzwitch deleted the keys-and-callbacks branch December 19, 2024 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Session state key
2 participants