m-wrzr / streamlit-searchbox

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

Edit selected value for resubmission #35

Closed gtzanet closed 4 months ago

gtzanet commented 7 months ago

Hi, I am using the searchbox for some time, but I'm wondering if there is any way to keep editing the content after selection. I'm trying to make an autocomplete tool and other that that the widget is perfect for what I want. After I select a suggestion I want to be able to edit it (e.g. delete a word etc.) so that I get new suggestions without writing the prompt from scratch. Thanks in advance.

m-wrzr commented 6 months ago

Hey, sorry for the late response. I've added a new option edit_after_submit in the latest version. There are options to keep the current input editable current, use the suggested option or the concat both.

Hope that helps with your usecase.

m-wrzr commented 5 months ago

example: https://github.com/m-wrzr/streamlit-searchbox/issues/38#issuecomment-2055280719