-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
Checklist
- I have searched the existing issues for similar issues.
- I added a very descriptive title to this issue.
- I have provided sufficient information below to help reproduce this issue.
Summary
After entering multiple lines of text into the st.chat_input control, the input box remains at the multi-line height even after sending the message
or clearing the input. It does not shrink back to the original single-line height.
Reproducible Code Example
import streamlit as st
text = st.chat_input("input")
if text:
st.write(text)Steps To Reproduce
Use Streamlit version 1.47.1.
Add st.chat_input to your app, for example:
import streamlit as st
text = st.chat_input("input")
if text:
st.write(text)
Run the app.
In the chat input, enter text that spans multiple lines (e.g., using Shift+Enter).
Send the message (press Enter or click send).
Observe the chat input box.
Expected Behavior
After sending the message, the chat input box should shrink back to its original single-line height if the input area is empty.
Current Behavior
The chat input box remains at the expanded multi-line height, even after sending the message or clearing the input.
Is this a regression?
- Yes, this used to work in a previous version.
Debug info
- Streamlit version: 1.47.1
- Python version: 3.11.8
- Operating System: Ubuntu 22 LTS
- Browser: Edge
Additional Information
No response