Skip to content

Commit

Permalink
add print debugging for new feature
Browse files Browse the repository at this point in the history
  • Loading branch information
hoggatt committed Sep 15, 2023
1 parent 46c3e9f commit 3c6e62b
Show file tree
Hide file tree
Showing 2 changed files with 13 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="1.0.2",
version="1.0.3",
author="hoggatt",
description="Streamlit AutoComplete ComboBox",
long_description=long_description,
Expand Down
12 changes: 12 additions & 0 deletions st_combobox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ def _get_value(value: any) -> any:
st.session_state[key]["options_real_type"] = [_get_value(v) for v in search_results]

# rerun if specified unless we are making the default search and our results are the same size as the previous search (prevent infinite loop)
print(
"-in loop now should we restart?: ",
blank_search_value is not None,
searchterm == blank_search_value,
prev_size == len(st.session_state[key]["options"]),
)
print("-rerun_on_update: ", rerun_on_update)
print("-stop_on_update: ", stop_on_update)
print("-blank_search_value: ", blank_search_value)
print("-searchterm: ", searchterm)
print("-prev_size: ", prev_size)
print("-len(st.session_state[key][options]): ", len(st.session_state[key]["options"]))
if rerun_on_update and not (
blank_search_value is not None
and searchterm == blank_search_value
Expand Down

0 comments on commit 3c6e62b

Please sign in to comment.