glideapps / glideapps/glide-data-grid

onPaste does not work correctly for Excel modified data after 5.3.2

Open
#916 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
5.3k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

Hello,

We've encountered a regression after updating from version `5.3.1-alpha1` to latest version of the library - `onPaste` is no longer parsing modified table data that is copied from desktop Excel correctly if a custom `onPaste` function is used.

This can be easily checked by doing:

```
onPaste={(target, values) => {
console.log(target.values);
return false;
}}
```

And copying multi-cell data from the glide table to Excel, modifying it and pasting it back (gif below).

What is returned in `values` are the original values of the cells instead of the new data that has been copied from Excel.

I've done some debugging and it seems like version `5.3.2` already introduced the breaking change.

When pasted into notepad it shows the correct new values, but when pasted into the table it pastes the original values even if the table was since reloaded or cleared. Very confusing, it's like there's invisible data that gets copied which is equal to the original values?

@jassmith could you take a look?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.