Skip to content

Commit

Permalink
reset actually resets list
Browse files Browse the repository at this point in the history
  • Loading branch information
hoggatt committed Sep 13, 2023
1 parent d8293b9 commit e77af31
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="st-combobox",
version="0.1.6",
version="0.1.7",
author="hoggatt",
description="Streamlit AutoComplete ComboBox",
long_description=long_description,
Expand Down
11 changes: 11 additions & 0 deletions st_combobox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,17 @@ def st_combobox(
print("-reset population")
_process_search(search_function, key, blank_search_value, rerun_on_update)

# redraw component with new options
react_state = _get_react_component(
options=st.session_state[key]["options"],
clear_on_submit=clear_on_submit,
placeholder=placeholder,
label=label,
# react return state within streamlit session_state
key=key_react,
**kwargs,
)

return default

# only return something real if there was a submit. If anything else happens, return nothing
Expand Down

0 comments on commit e77af31

Please sign in to comment.