St.multiselect not populating with selection after callback

Hi all, running into some issues where st.multiselect is not populating selected values on click. The st.multiselect has a callback function that updates a dataframe (which feeds the multiselect options dropdown - this may be the issue here). Any idea how to retain the selected values upon selection, while still updating the multiselect options?

Can you show a demo code ?

I am having a very similar issue. In my case I was using the multiselect widget within a β€œst.form”. In this case effectively the selected values do NOT get updated. Now if you implement the multiselect out of any β€œst.form” ,then it works. I do not know why. I was just trying to investigate that.

For a better clarification see the pictures below:
1- Outside any st.form:
out_of_form

2- Inside any st.form:
within_a_form

I hope that helps or hopefully someone else knows better? Txs

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.