Skip to content
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

[Bug]: paste after cut gives not changed cells #1411

Open
doczoidberg opened this issue May 20, 2024 · 6 comments
Open

[Bug]: paste after cut gives not changed cells #1411

doczoidberg opened this issue May 20, 2024 · 6 comments
Labels
API Public methods and properties Bug Something isn't working

Comments

@doczoidberg
Copy link

doczoidberg commented May 20, 2024

Description

Pasting after cutting cells does not give the changed cells back as described in the documentation.

example:

https://codesandbox.io/p/devbox/dawn-sunset-4pqrpt?file=%2Fsrc%2Fui.js%3A46%2C49

Video or screenshots

No response

Demo

https://codesandbox.io/p/devbox/dawn-sunset-4pqrpt?file=%2Fsrc%2Fui.js%3A46%2C49

HyperFormula version

2.7

Your framework

No response

Your environment

mac or windows

@adrianszymanski89
Copy link
Contributor

Hi @doczoidberg

Thank you for contacting us. I wanted to check the issue, but I don't have permission to view the sandbox you sent. Can you please change the access rules?

@doczoidberg
Copy link
Author

sorry. now public

@adrianszymanski89
Copy link
Contributor

@doczoidberg

The documentation says that using paste() right after cut() behaves the same as moveCells(), which is what we can observe in your example, as you are pasting the second row in the place of the first. It seems to work as intended.

@doczoidberg
Copy link
Author

doczoidberg commented May 20, 2024

but how can I get the changed cells after the pasting?

I need all changes (could also be changed references)

Documentation also says:

// returns a list of modified cells: their absolute addresses and new values
const changes = hfInstance.paste({ sheet: 0, col: 1, row: 0 });

@adrianszymanski89
Copy link
Contributor

@doczoidberg

I asked our HyperFormula developer for clarification on this, as it's not clear if that's the correct behavior. I'll update you once I have feedback from him.

@adrianszymanski89
Copy link
Contributor

Hi @doczoidberg

I just got confirmation from our developer that this is indeed a bug, and the description in the documentation might be misleading. I'll update you once we fix this.

@adrianszymanski89 adrianszymanski89 added Bug Something isn't working API Public methods and properties labels May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Public methods and properties Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants