On_click function on multiselect box - multiple execution

Summary

Hi,
I have noticed that the “On-change” function I added to the multi-select button on my app is being executed twice :frowning:
Do you know why is it happening? Is it because I click twice on the button:

  1. Open the dropdown list
  2. Selecting a value?

Thanks :slight_smile:

Do you know why is it happening?

Probably because of the way you coded it.

Is it because I click twice on the button:

  1. Open the dropdown list
  2. Selecting a value?

No. Opening the list does not trigger a call to the callback. Selecting a value does. For me at least (Streamlit v1.21.0)

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