Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot paste strings with commas into data_editor selectbox #7727

Closed
3 of 4 tasks
nliusont opened this issue Nov 15, 2023 · 4 comments · Fixed by #7779
Closed
3 of 4 tasks

Cannot paste strings with commas into data_editor selectbox #7727

nliusont opened this issue Nov 15, 2023 · 4 comments · Fixed by #7779
Labels
feature:st.column_config Related to column config functionalities feature:st.data_editor priority:P3 status:confirmed Bug has been confirmed by the Streamlit team type:bug Something isn't working

Comments

@nliusont
Copy link

nliusont commented Nov 15, 2023

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

@nliusont nliusont added status:needs-triage Has not been triaged by the Streamlit team type:bug Something isn't working labels Nov 15, 2023
Copy link

If this issue affects you, please react with a 👍 (thumbs up emoji) to the initial post.

Your feedback helps us prioritize which bugs to investigate and address first.

Visits

@LukasMasuch LukasMasuch added priority:P3 feature:st.data_editor feature:st.column_config Related to column config functionalities status:confirmed Bug has been confirmed by the Streamlit team and removed status:needs-triage Has not been triaged by the Streamlit team labels Nov 16, 2023
@LukasMasuch
Copy link
Collaborator

@nliusont Thanks for reporting this issue. I was able to reproduce it here.

@LukasMasuch
Copy link
Collaborator

We merged the update of the underlying grid library. I believe this fixes the issue described here. This will be released in 1.32.

@sfc-gh-jesmith
Copy link

sfc-gh-jesmith commented Mar 25, 2024

Hey @nliusont,

Wanted to follow up that the updates are live as of the latest release 1.32.2. 🥳

Thanks for your valuable input and feedback!

zyxue pushed a commit to zyxue/streamlit that referenced this issue Apr 16, 2024
## Describe your changes

Glide-data-grid had a [major update](glideapps/glide-data-grid#810).
This PR updates to this version and adapts the implementation for all the
breaking/updated features. This update fixes a variety of issues (see list below).
 
## GitHub Issue Link (if applicable)

Closes streamlit#6900
Closes streamlit#7032
Closes streamlit#7727
Closes streamlit#6810
Closes streamlit#7930
Closes streamlit#7949
Closes streamlit#7831
Closes streamlit#8168

## Testing Plan

- Updated tests

---

**Contribution License Agreement**

By submitting this pull request you agree that all contributions to this
project are made under the Apache 2.0 license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:st.column_config Related to column config functionalities feature:st.data_editor priority:P3 status:confirmed Bug has been confirmed by the Streamlit team type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants