diff --git a/setup.py b/setup.py index f243835..fa63826 100644 --- a/setup.py +++ b/setup.py @@ -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, diff --git a/st_combobox/__init__.py b/st_combobox/__init__.py index 4a49947..2a99828 100644 --- a/st_combobox/__init__.py +++ b/st_combobox/__init__.py @@ -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