m-wrzr / streamlit-searchbox

Streamlit searchbox that dynamically updates and provides a list of suggestions based on a provided function
MIT License
203 stars 26 forks source link

How to reset to my default_options after pressing reset button? #31

Closed rex-lui closed 5 months ago

rex-lui commented 6 months ago

Hi,

Nice to meet you and I am currently trying to use this package. I faced an issue and hoped that anyone may solve me out.

I typed a search term to shorten my selection list and then I selected one of the value from it. When I clicked the reset button and clicked the small triangle button again, the list showing to me was not the default list which I set, it's still the shorten list instead. It would be good if the default list is always still showing up whenever the user click on reset button.

May I know anyway I can fix this? Thanks a lot.

m-wrzr commented 5 months ago

Hey, sorry for the late response and thanks for the suggestion! I've added a general reset to the searchbox when the user clicks the clear button. Now the behavior should be as you described from versions >= 0.1.7