streamlit-pydantic
streamlit-pydantic copied to clipboard
Lists(except files list) do not work in sidebar forms
Description:
lists of integers or strings (or in my assumption any other primitive type) as datatype does not work when using in sidebar form.
The above does not occur and we get the clear
and add item
buttons but they disappear when used insidebar forms
Expected Behaviour:
this should be consistent across all forms (for my use-case at least sidebar-form)
Steps to reproduce:
class IDsModel(BaseModel):
ids: List[str] = Field( [], max_items=8, description="Enter ids")
with st.sidebar.form(key="dummy_form"):
dummy_session_data = sp.pydantic_input(key="dummy_model", model=IDsModel)
P.S. love the pydantic <-> streamlit integration <3
Just to update the behaviour occurs when the form is inside a conainer or exapnder as well
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days
Bumping as I have the same problem.