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

Component Value Payload Improvements #7

Merged
merged 6 commits into from
Dec 15, 2023

Conversation

rahadi23
Copy link
Collaborator

Purpose

This PR is mainly aimed to resolve #5.

What's Changed

Currently, the component value payload is created by relying on JSON.parse(JSON.stringify(arg)) which suffers from cyclic properties issue. This issue is mainly caused by some properties that contain values that are actually have no meaningful importance when passed/returned to the streamlit or python environment, such as the js event and DOM elements.

Therefore, this PR is focused on removing these properties, keeping only selected properties that have a good significance to be used in streamlit environment. Some highlighted changes are as follows:

Expose component value payload only as needed

This is the main focus of this PR. Please be mindful that there will be a breaking change, which is if anyone was consuming the now omitted properties in their projects, they should also adapt to that change.

Rewrite Calendar as functional component

This is to ensure that the component is future proof, as class component is generally avoided nowadays.

Add new typings

This is to ensure that the typings of the frontend code would be typesafe.

Thank you!

- rewrite `Calendar` as functional component
- expose component value payload only as needed
- add new typings

BREAKING CHANGE: some exposed properties will no longer be available
@rahadi23 rahadi23 requested a review from im-perativa December 14, 2023 09:00
@rahadi23 rahadi23 requested a review from im-perativa December 14, 2023 16:28
@im-perativa im-perativa merged commit 1e3383c into im-perativa:master Dec 15, 2023
2 checks passed
@im-perativa
Copy link
Owner

🎉 This issue has been resolved in version 1.0.0 🎉

The release is available on PyPI and GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

list model bug when click "list" button
2 participants