diff --git a/setup.py b/setup.py index a639829..b6ce18f 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="st-combobox", - version="0.1.3", + version="0.1.4", author="hoggatt", description="Streamlit AutoComplete ComboBox", long_description=long_description, diff --git a/st_combobox/__init__.py b/st_combobox/__init__.py index c72718b..d33c792 100644 --- a/st_combobox/__init__.py +++ b/st_combobox/__init__.py @@ -87,7 +87,7 @@ def st_combobox( clear_on_submit: bool = False, key: str = "combobox", rerun_on_update: bool = True, - load_blank = False, + initial_search_value: str = None, **kwargs, ) -> any: """ @@ -109,8 +109,8 @@ def st_combobox( Streamlit session key. Defaults to "combobox". rerun_on_update (bool, optional): Rerun the search function on each keystroke. Defaults to True. - load_blank (bool, optional): - Load blank combobox on first run. Defaults to False. + initial_search_value (str, optional): + Initial search value. If none, will not do an initial search. Defaults to None. Returns: any: based on user selection @@ -130,8 +130,8 @@ def st_combobox( } # load stuff the first run if called for - if not load_blank: - _process_search(search_function, key, value, rerun_on_update) + if initial_search_value is not None: + _process_search(search_function, key, initial_search_value, rerun_on_update) # everything here is passed to react as this.props.args react_state = _get_react_component(