Skip to content

Commit

Permalink
fix: retain selected columns in Streamlit multiselect default
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovler-Young committed Nov 20, 2024
1 parent 0ed3a2d commit 07a23bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ia_collection_analyzer/streamlit.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
seleactable_columns = [col for col in items_pd.columns if col not in REQUIRED_METADATA]

col1, col2 = st.columns([6, 1], vertical_alignment="bottom")
selected_columns = st.multiselect("Select columns:", seleactable_columns, default=[])
selected_columns = st.multiselect("Select columns:", seleactable_columns, default=st.session_state.selected_columns)

filtered_pd = items_pd[REQUIRED_METADATA + selected_columns]
filtered_pd = filtered_pd.dropna(axis=0, how="any")
Expand Down

0 comments on commit 07a23bc

Please sign in to comment.