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

[data grid] Multiline gets pasted with double quotes #11945

Closed
PEsteves8 opened this issue Feb 5, 2024 · 2 comments · Fixed by #12357
Closed

[data grid] Multiline gets pasted with double quotes #11945

PEsteves8 opened this issue Feb 5, 2024 · 2 comments · Fixed by #12357
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Clipboard Related to clipboard copy or paste functionalities

Comments

@PEsteves8
Copy link
Contributor

PEsteves8 commented Feb 5, 2024

Steps to reproduce

Link to live example: https://mui.com/x/react-data-grid/recipes-editing/

Steps:

  1. Visit the example page: https://mui.com/x/react-data-grid/recipes-editing/
  2. Add the disableRowSelectionOnClick attribute so that single cells can be selected (it also happens without this, but this makes the example more similar to real use cases)
  3. Write in one of the multiline cells a text with actual multiple lines (that is, hit enter to create lines, the ones in the example are single line text).
  4. Copy the content of that cell and paste it in another multline cell
  5. The content from that cell will have double quotes around the multiline text

Here's a demo:
screen-capture.webm

Also looking at the behavior of Airtable, they also have double quotes when copying, but successfully remove them on pasting, and if pasting on multiline they correctly paste it into one cell, instead of interpreting new lines as meaning new rows and pasting on subsequent rows like mui x ( see: #11754 ).

So ultimately I don't know if the problem is double quotes being copied instead of text with /n characters, or double quotes being pasted instead of removed.

Your environment

Windows 11
Chrome 121

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: copy paste multiline
Order ID: 82566

@PEsteves8 PEsteves8 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 5, 2024
@oliviertassinari oliviertassinari added the component: data grid This is the name of the generic UI component, not the React module! label Feb 5, 2024
@michelengelen michelengelen added bug 🐛 Something doesn't work feature: Clipboard Related to clipboard copy or paste functionalities labels Feb 6, 2024
@michelengelen
Copy link
Member

Hey @PEsteves8 ... I can confirm this bug. I have put it on the board for our team to look at it! Thanks for raising this issue! 🙇🏼

@michelengelen michelengelen removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 6, 2024
@michelengelen michelengelen changed the title [DataGridPremium] Multiline gets pasted with double quotes [data grid] Multiline gets pasted with double quotes Feb 6, 2024
Copy link

⚠️ This issue has been closed.
If you have a similar problem, please open a new issue and provide details about your specific problem.
If you can provide additional information related to this topic that could help future readers, please feel free to leave a comment.

How did we do @PEsteves8?
Your experience with our support team matters to us. If you have a moment, please share your thoughts through our brief survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Clipboard Related to clipboard copy or paste functionalities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants