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

e.preventDefault() not working for mouseclick in cell for 10.0.0 version #1691

Closed
buscemrx opened this issue Jun 6, 2017 · 5 comments
Closed

Comments

@buscemrx
Copy link

buscemrx commented Jun 6, 2017

In using ag-grid 8.2.0, the event.preventDefault() method worked by preventing the default behavior of clicking a Link in a cell. This is the behavior I needed for launching a react form after I received data within the onCellClicked Event Handler. We upgraded to ag-grid version 10.0.0 version and event.preventDefault() no longer prevents the default behavior of clicking on a Link embedded in a cell. I had to revert back to 8.2.0 to get back the functionality.

@buscemrx buscemrx changed the title e.preventDefault() e.preventDefault() not working for mouseclick in cell for 10.0.0 version Jun 6, 2017
@amit-coditas
Copy link

have you found any solution? @buscemrx

@makinggoodsoftware
Copy link
Contributor

Hi,

Thank you for raising this issue for us, at this moment we are reviewing how we process Feature Requests/questions that come through from GitHub.

As I am sure you are aware, we offer two products:

ag-Grid - this is entirely free to use in line with our MIT license
ag-Grid Enterprise - our commercial version which funds the development of both versions.

We currently have a very full pipeline of work which can be viewed here: https://www.ag-grid.com/ag-grid-pipeline/

This will be our priority for the coming months and as a result, we don’t have capacity to take feature requests/questions from GitHub, but you might find that yours has already been raised in our pipeline.

We will do a periodic review of GitHub issues for any bugs raised and these can also be tracked on our pipeline page.

Thanks for your understanding.
ag-Grid Team.

@andrewphillipo
Copy link

Really this is a terrible response. A lot of the people on here are paying customers, maybe github need to be able to show us but I have to say a generic message fobbing people off who have real issues is not "making good software".

@Tsyklop
Copy link

Tsyklop commented Dec 13, 2023

solution?

@gportela85
Copy link
Member

gportela85 commented Dec 13, 2023

@Tsyklop
Might too late for @andrewphillipo @buscemrx and @amit-coditas but...

The reason why this doesn't work since v10 of Ag Grid is because asynchronous events were introduced, so by the time you call e.preventDefault() it is already too late.

You can either set the gridOptions with suppressAsyncEvents: true or since you have a link in your cell, I'm assuming you have a Custom Cell Renderer.
You can add a listener with preventDefault() there (which I think it's the appropriate solution instead of using onCellClicked)

Approach 1 (suppressAsyncEvents) - https://plnkr.co/edit/fKPNOL5bCc5Unxoo?open=main.js
Approach 2 (using preventDefault in the cell Renderer) - https://plnkr.co/edit/EZZj2F9QxNnYcGuo?open=main.js

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

6 participants