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

Datagrid: Clicking a hyperlink shouldn't also trigger select/deselect #8498

Closed
eaenriquez opened this issue Feb 28, 2024 · 2 comments · Fixed by #8578
Closed

Datagrid: Clicking a hyperlink shouldn't also trigger select/deselect #8498

eaenriquez opened this issue Feb 28, 2024 · 2 comments · Fixed by #8578
Assignees
Labels
team: m3 Issues for m3 and sub teams type: enhancement ✨ [2] Velocity rating (Fibonacci)

Comments

@eaenriquez
Copy link
Contributor

eaenriquez commented Feb 28, 2024

Describe the Issue
In the datagrid, clicking on a row selects/deselects the whole row. But when clicking on a hyperlink in a cell, we don't want it to trigger the select/deselect. Would there be other ways to prevent it?

To Reproduce

  1. Just render a datagrid
  2. use a hyperlink formatter on a column
  3. click on a hyperlink

What did you try so far
Tried to use the event's stopPropagation and preventDefault on the enterprise's datagrid code base locally

Version

  • ids-enterprise: 4.91.0-dev.0
@tmcconechy tmcconechy added type: enhancement ✨ [2] Velocity rating (Fibonacci) labels Feb 28, 2024
@tmcconechy
Copy link
Member

@eaenriquez we have an option data grid for this clickToSelect you can set to false then only the checkboxes will select? Is this enough or do you think we need to change for when this is off and just not select on buttons/hyperlinks?

@eaenriquez
Copy link
Contributor Author

@tmcconechy I wish the clickToSelect property would be enough, but the use case in our application (M3 ExD) is to click a row to select, ever since.

If there was a property like shouldSelectOnHyperlinkCellClick as a boolean (setting it to false would not trigger select/deselect) on gridOptions, that would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team: m3 Issues for m3 and sub teams type: enhancement ✨ [2] Velocity rating (Fibonacci)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants