-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
External copy paste handlers #2981
base: main
Are you sure you want to change the base?
Conversation
}: { | ||
onPasteCallback?: boolean; | ||
onCopyCallback?: boolean; | ||
externalCopy?: boolean; | ||
externalPaste?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would try to keep the "on" convention they have in the previous callers, just to keep aligned with their code style.
Code looks good and thanks for this improvement, I am looking forward to this change too.
This is a feature Which I need |
Hi @DVGY do you still need this feature or did you find another way? Thanks!! |
Still need this feature |
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: