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

onCellValueChanged event not triggered by paste in v21.2.0 #3364

Closed
annaborja opened this issue Sep 8, 2019 · 23 comments
Closed

onCellValueChanged event not triggered by paste in v21.2.0 #3364

annaborja opened this issue Sep 8, 2019 · 23 comments

Comments

@annaborja
Copy link

I'm submitting a ...

[x] bug report
[] feature request
[] support request

Note: I am an Enterprise customer, but I have not yet received credentials for filing this bug in Zendesk.

Current behavior
When pasting (cmd+V) into the grid, the onCellValueChanged callback is not called.

You can see this bug in the ag-Grid documentation. In the Clipboard Example (https://www.ag-grid.com/javascript-grid-clipboard/#clipboard-example), if you paste into the grid, "cellValueChanged" is never logged in the console, contrary to what the documentation states.

image

Expected behavior
onCellValueChanged callback should be called for every pasted cell. This behavior works correctly in v21.1.1, so it looks like a regression introduced in v21.2.0.

  • ag-Grid version: 21.2.0

  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36

  • Language: ES6

@ajkaushik
Copy link

We have the same issue, reported via ZenDesk as well

@davis4acca
Copy link
Contributor

Hi,

Thank you for your email. We are aware of this issue and have a feature request in our backlog:

You can follow the status of feature requests, bugs and releases using our pipeline:
https://www.ag-grid.com/ag-grid-pipeline/

If you are an ag-Grid Enterprise Customer, please raise this in our Zendesk support system - contact info@ag-grid.com for access. This is our primary channel for Support.

This is the reference and summary of the relevant issue:

AG-3298 onCellValueChanged does not fire when copying/pasting a range in the grid

natejcho added a commit to natejcho/ag-grid that referenced this issue Sep 10, 2019
Issue ag-grid#3364 

As of version 21.2.1 ag-grid no longer triggers onCellValueChanged when pasting in data. This is due to setValue being called with suppressCellValueChangedEvent=true in updateCellValue method inside clipboardService class.

Suggested fix is to remove true parameter and set suppressCellValueChangedEvent to undefined. Or to remove return statement in ag-grid-enterprise ValueService.prototype.setValue
`
if (suppressCellValueChangedEvent) {
    return;
}
`
@prabhakerb
Copy link

do you have any ETA to fix this issue(AG-3298 onCellValueChanged does not fire when copying/pasting a range in the grid)?.

@matthewstick
Copy link

what's the work around? this is pretty major...

@annaborja
Copy link
Author

According to the ag-Grid changelog, this should be fixed in v21.2.2 (https://www.ag-grid.com/ag-grid-changelog/?fixVersion=21.2.2), but I haven't yet upgraded and verified that it's working.

@ajkaushik
Copy link

ajkaushik commented Oct 10, 2019 via email

@ajkaushik
Copy link

I take my words back. After the patch the behavior is actually weird, cellValue changed is firing but the value getters have stopped working.

@annaborja
Copy link
Author

@ajkaushik , did you report the regression on Zendesk? I need this bug fixed before I can upgrade my version of ag-Grid, so I want to follow the thread to be informed when it's fixed.

@ajkaushik
Copy link

ajkaushik commented Oct 18, 2019 via email

@annaborja
Copy link
Author

@ajkaushik , did v22.0.0 fix this issue for you? It looks like my functionality is still broken, but I want to see if anyone else is also experiencing issues.

@matthewstick
Copy link

It works in v21.2.2. I have MAJOR issues with 22.0.0. I cannot copy and paste anything! All Copy and Paste has broken. I rolled back to 21.2.2. and everything works fine, including this ticket.

It's such a huge bug, I didn't log it because I just figured everyone will be complaining about it.

@annaborja
Copy link
Author

annaborja commented Nov 17, 2019

@matthewstick , yeah that's what I'm experiencing as well: copy-paste is completely broken in v22.0.0. This issue has been very frustrating. :( I'll have to investigate what exactly is going on so I can log a more detailed issue in Zendesk. When I tried to follow up about this bug, all they said to me was:

Hi, 

Thank you for your email.

I can confirm that this bug has been flagged as 'done' in the latest version of the grid. 

Many thanks, 
-------

@matthewstick
Copy link

@annaborja I rolled back to 21.2.2 and all is good, including this ticket. This is such a huge issue - I expect a 22.0.1 ticket any day now

@ajkaushik - please take note!

@annaborja
Copy link
Author

Copy-paste seems to be working in their documentation example (https://www.ag-grid.com/javascript-grid-clipboard/#clipboard-example), but it broke in my code, so clearly something changed in the implementation between versions 21 and 22.

@annaborja
Copy link
Author

Thanks @matthewstick ! I'll try 21.2.2.

@ajkaushik
Copy link

@annaborja @matthewstick It works with the upgrade, we just upgraded to v22.0.0. Copy/paste works ok and expected events are being fired.

@matthewstick
Copy link

@ajkaushik it doesn't work. Both Ann and I had to roll back. Copy and Paste, via 22.0.0, is 100% broken.

This is not a hypothetical situation. We upgraded to 22.0.0, ran into major issues, then had to roll back.

My guess is you did not test all scenarios?

@ajkaushik
Copy link

@matthewstick It works in our application, just a simple user like yourself and obviously have not tested all the scenarios. But simple copy/paste works and fires cellValueChanged and formatters correctly. I would suggest to open a new issue.

We have upgraded to use @ag-grid-enterprise/all-modules package.

@matthewstick
Copy link

@ajkaushik Ah, ok I thought you were on the Craft team. That's why I was pushing back. Sorry about that. Thanks!

@razvanbh
Copy link

Copy and paste also broke in our app after upgrading to 22.0.0, rolling back to 21.2.2 fixed the problem.

@lroot
Copy link

lroot commented Jan 7, 2020

For those looking for an update on this issue (at least for the ag-grid-enterprise module), I do have an open ticket with Enterprise support which looks like it will address this.

I first created a simple repo that demonstrates the issue so their support team could review: https://github.com/lroot/ag-grid-copy-paste-bug-demo

The support team then responded:

... the issue you're having is down to a bug (AG-3694-Clipboard module missing from ag-grid-enterprise) which should be fixed in the next release...

An example workaround was provided: https://stackblitz.com/edit/ag-grid-vue-hello-world-qi4hhv?file=app.js

This involves extracting the clipboard module explicitly from the ag-grid-enterprise module and registering it with the ag-grid-community module:

screenshot

@carboni-rob
Copy link

That worked, thank you very much @lroot !
In case it may help anybody, we had to install @ag-grid-enterprise/clipboard first.

@MarionCrp
Copy link

Thank you for the workaround. But is there no proper fix provided by ag-grid since this "bug" exists ? I am expecting that callbacks is triggered when pasting multiple cells :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants