Skip to content

Commit

Permalink
bug fix for initial search value
Browse files Browse the repository at this point in the history
  • Loading branch information
hoggatt committed Sep 13, 2023
1 parent 1d4a976 commit a7890cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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.3",
version="0.1.4",
author="hoggatt",
description="Streamlit AutoComplete ComboBox",
long_description=long_description,
Expand Down
10 changes: 5 additions & 5 deletions st_combobox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
"""
Expand All @@ -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
Expand All @@ -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(
Expand Down

0 comments on commit a7890cf

Please sign in to comment.