react-data-grid icon indicating copy to clipboard operation
react-data-grid copied to clipboard

External copy paste handlers

Open adam-kuhn opened this issue 3 years ago • 3 comments

This PR adds two callback props for the copy and paste events. The new props allow developers to write their own logic for the copy and paste events. Thereby, allowing the devs to respond to the events as they see fit, by having all of the logic outside of react-data-grid.

The primary limitations of the internal copy/paste logic provided by react-data-grid, is the inability to copy/paste items from external sources by writing to the clipboard. As well as the limitation of only being able to copy one cell at a time. By letting developers write there own logic to these events, these use cases can be addressed by enabling the dev to write their own logic.

Possible use cases for these two props:

  • copying values to the clipboard
  • pasting values from the clipboard
    • allows the user to paste data that was copied from outside of react-data-grid
  • copying from multiple cells
  • pasting to multiples cells

adam-kuhn avatar Aug 06 '22 17:08 adam-kuhn

This is a feature Which I need

DVGY avatar Jul 02 '23 15:07 DVGY

Hi @DVGY do you still need this feature or did you find another way? Thanks!!

flipvh avatar Feb 10 '24 22:02 flipvh

Hi @DVGY do you still need this feature or did you find another way? Thanks!!

Still need this feature

DVGY avatar Feb 11 '24 04:02 DVGY

Thank you for the PR. Copy/Paste support added in https://github.com/adazzle/react-data-grid/pull/3667

amanmahajan7 avatar Apr 10 '25 18:04 amanmahajan7