Checklist
Summary
I’m experiencing state management issues with st.pills when the available options change dynamically based on other user selections. The main problems are:
Double-click requirement: When something is already selected, I need to click twice on pills to toggle them
State reset: When I add new selections in a parent category that changes available options in child categories, previously selected items in child categories get reset/cleared
Use Case
I have a hierarchical selection UI:
Device Types (st.pills) → determines available Model Groups
Model Groups (st.pills) → determines available Model Numbers
Model Numbers (st.pills)
When a user selects additional device types, new model groups become available, but previously selected model groups/numbers get cleared.
Expected Behavior
Single click should toggle pill selection
When parent selections change and new options become available, previously selected items that are still valid should remain selected
Only invalid selections (no longer available) should be cleared
Reproducible Code Example
Steps To Reproduce
No response
Expected Behavior
No response
Current Behavior
No response
Is this a regression?
Debug info
- Streamlit version:
- Python version:
- Operating System:
- Browser:
Additional Information
No response
Checklist
Summary
I’m experiencing state management issues with st.pills when the available options change dynamically based on other user selections. The main problems are:
Double-click requirement: When something is already selected, I need to click twice on pills to toggle them
State reset: When I add new selections in a parent category that changes available options in child categories, previously selected items in child categories get reset/cleared
Use Case
I have a hierarchical selection UI:
Device Types (st.pills) → determines available Model Groups
Model Groups (st.pills) → determines available Model Numbers
Model Numbers (st.pills)
When a user selects additional device types, new model groups become available, but previously selected model groups/numbers get cleared.
Expected Behavior
Single click should toggle pill selection
When parent selections change and new options become available, previously selected items that are still valid should remain selected
Only invalid selections (no longer available) should be cleared
Reproducible Code Example
Steps To Reproduce
No response
Expected Behavior
No response
Current Behavior
No response
Is this a regression?
Debug info
Additional Information
No response