Skip to content

Cannot paste strings with commas into data_editor selectbox #7727

@nliusont

Description

@nliusont

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

Open in Streamlit Cloud

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:st.column_configRelated to column configuration functionalityfeature:st.data_editorRelated to the `st.data_editor` widgetpriority:P3Medium prioritystatus:confirmedBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions