revolist / revogrid

Powerful virtual data grid smartsheet with advanced customization. Best features from excel plus incredible performance 🔋
https://rv-grid.com
MIT License
2.74k stars 171 forks source link

Clipboard with JSON Support and Advanced Objects #383

Closed eddie-englund closed 1 month ago

eddie-englund commented 1 year ago

I have an issue where some values I can only get some in objects, in this case, a value and a currency.

"metaAmount": { "value": 100, "cy": "EUR" }

And so to display currency in its own column I must do a create element

    cellTemplate: (createElement, { model, prop }) => createElement('p', {  }, model[prop].cy)

However, the issue now is that if you attempt to copy this value you will get the "props" value which is an object and then the copy value becomes [object Object].

I'd like to be able to alter what actually becomes copied.

Example of the issue (copy the "bar" value in the second column) https://codesandbox.io/s/revo-grid-vanilla-js-forked-w1ndqq

Cheers

revolist commented 2 months ago

We have this as part of Pro version also you could overwrite all events starting from v4. Please check https://rv-grid.com/guide/api/clipboard.html

revolist commented 2 months ago

Objective: Enable clipboard functionality to support JSON and advanced objects for copying and pasting complex data structures.

Description: Develop clipboard functionality that allows copying and pasting of JSON and complex data structures between grids and applications.

Acceptance Criteria:

revolist commented 1 month ago

Done