Checklist
Summary
Thanks for the great library, really powerful !
I have noticed a bug that you can reproduce with the minimalist example.
Reproducible Code Example
import streamlit as st
import streamlit_pydantic as sp
from pydantic import BaseModel
class Model(BaseModel):
i: int
s: str
a= Model(i=1, s="1")
b= Model(i=2, s="2")
init = st.selectbox(label="instance", options=[a, b])
data = sp.pydantic_form(key="f", model=init)
if data:
st.json(data)
Steps To Reproduce
When you change the init model from the select box, the string default is successfully updated but not the int.
Expected Behavior
No response
Current Behavior
No response
Is this a regression?
Debug info
Additional Information
Not sure how the session state this handled under the hood, do you have any quick work around ? Or if you have any idea where the bug can come from, please points me the function I can have a look.
Checklist
Summary
Thanks for the great library, really powerful !
I have noticed a bug that you can reproduce with the minimalist example.
Reproducible Code Example
Steps To Reproduce
When you change the init model from the select box, the string default is successfully updated but not the int.
Expected Behavior
No response
Current Behavior
No response
Is this a regression?
Debug info
Additional Information
Not sure how the session state this handled under the hood, do you have any quick work around ? Or if you have any idea where the bug can come from, please points me the function I can have a look.