Skip to content

Commit

Permalink
bug fix: 'all' button
Browse files Browse the repository at this point in the history
  • Loading branch information
hanhou committed Oct 24, 2023
1 parent 4c9a266 commit 4c94b3b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/util/streamlit_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ def filter_dataframe(df: pd.DataFrame) -> pd.DataFrame:
ll, rr = right.columns([5, 1])
ll.markdown(f"Filter for **{column}**")
select_all = rr.button('all', key=f'select_all_{column}')
if select_all:
ss[f'select_{column}_cache'] = list(df[column].unique()) # Manually cache 'all' press
selected = right.multiselect(
f"Values for {column}",
df[column].unique(),
Expand Down

0 comments on commit 4c94b3b

Please sign in to comment.