Waiting for streamlit button to complete other process execution

Hi, I have pop_up_component inside streamlit button , when the button is clicked ; pop_up_component will be triggered ; streamlit button should wait until it receives response from pop_up_component is this possible?

a=st.button("click me")
if a:
    if sp.st_custom_pop_up("Do you want to cancel?", key="first-key"):
        st.write("this is pop_up")
    st.write('This is button')

Hey @Siva_S,

Thanks for sharing this question! Can you share the component that you’re using? Also, when you say “button should wait until it receives response from pop_up_component” – what is the button waiting to do?