-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Cannot paste strings with commas into data_editor selectbox #7727
Copy link
Copy link
Closed
Labels
feature:st.column_configRelated to column configuration functionalityRelated to column configuration functionalityfeature:st.data_editorRelated to the `st.data_editor` widgetRelated to the `st.data_editor` widgetpriority:P3Medium priorityMedium prioritystatus:confirmedBug has been confirmed by the Streamlit teamBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedSomething isn't working as expected
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
I'm experiencing an issue with the data_editor selectbox column type where I cannot paste strings with commas into the selectbox column, even though the strings are in the list of selectbox options.
Reproducible Code Example
import streamlit as st
import pandas as pd
df = pd.DataFrame({
'copy_these':['a, b, c', 'a b c', 'car, house, horse', 'car house horse'],
'paste_here': ['', '', '', '']
})
st.data_editor(df, column_config={'paste_here': st.column_config.SelectboxColumn(
'paste_here',
help='',
width='medium',
options=df['copy_these'].to_list(),
required=False
),})Steps To Reproduce
If you run the above code and try to copy the strings from column1 into column2, only the strings without commas will paste. Even though the options provided to the selectbox are column1.
Expected Behavior
All values that are in the list of options should paste.
Current Behavior
Only the values without commas paste.
Is this a regression?
- Yes, this used to work in a previous version.
Debug info
- Streamlit version: 1.27.2
- Python version: 3.9.17
- Operating System: Mac OS Ventura
- Browser: Chrome
Additional Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature:st.column_configRelated to column configuration functionalityRelated to column configuration functionalityfeature:st.data_editorRelated to the `st.data_editor` widgetRelated to the `st.data_editor` widgetpriority:P3Medium priorityMedium prioritystatus:confirmedBug has been confirmed by the Streamlit teamBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedSomething isn't working as expected