Check if enter was pressed by user

Right now I have an app that has an st.text_input() that triggers when a person presses enter, and a drag and drop feature st.file_uploader() that triggers when a user uploads a dataframe. The issue is, I don’t want the st.text_input() to run when someone uploads a data frame, which is what is happening now. Is there a way I can see if the trigger was caused by, for example, someone pressing enter or if the trigger was caused by someone uploading a file? This way, I could right a simple if statement.

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