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.
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 componentThis 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!