adazzle / react-data-grid

Feature-rich and customizable data grid React component
https://adazzle.github.io/react-data-grid/
Other
6.95k stars 2.18k forks source link

Copying and pasting from/to clipboard #2736

Open marekhvolka opened 2 years ago

marekhvolka commented 2 years ago

Use case

It looks like when we define the onPaste handler, the copy/paste from/to clipboard doesn't work unless we double click into the cell. In our use case we need to have a custom onPaste handler, but this handler is not called when the source cell is empty.

Proposed solution

Pasting to the table cell from outside

  1. Copy some text to your clipboard
  2. Select a cell
  3. paste the value via ctrl + v (cmd + v on Mac)

Copying from the table cell outside

  1. Select a cell
  2. copy the value via ctrl + c (cmd + c on Mac)
  3. paste the value somewhere outside of the table
adityatoshniwal commented 2 years ago

It would be great to have this feature, just like excel.

peetjvv commented 2 years ago

Would also appreciate this feature. Especially to copy from and/or to Excel or Google Sheets.

thomassmartinez commented 1 year ago

Hello everyone, any updates on this feature or any workarounds we can use until it becomes a native part of the library?