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

Table ActionsColumn: Action can't be a link due to preventDefault #3392

Closed
elad661 opened this issue Dec 11, 2019 · 0 comments · Fixed by #3402
Closed

Table ActionsColumn: Action can't be a link due to preventDefault #3392

elad661 opened this issue Dec 11, 2019 · 0 comments · Fixed by #3402
Assignees
Milestone

Comments

@elad661
Copy link

elad661 commented Dec 11, 2019

We have a table on our app (OCM) with an actions column. One of the actions is an external link. When we implemented this with the usual Dropdown kebab toggle (before we heard of the actions column), this worked well - a Dropdown item is an <a> by default, so we can just specify an href, and it works well.

Now we want to use the actions column feature of the Table component.

The ActionColumn allows me to specify a list of actions. The IAction interface is defined as a superset of the DropdownItem props.

This means that it should, in theory, accept an href, and it does indeed render this correctly. However, the onSelect event handler in the ActionsColumn calls event.preventDefault();, which disable's the browser default link behavior, making the link non functional.

Since the default onSelect event handler is always called we have no way to work around this behavior, making this a blocking bug for us.

@tlabaj tlabaj added this to the Prioritized Backlog milestone Dec 11, 2019
@tlabaj tlabaj self-assigned this Dec 12, 2019
tlabaj pushed a commit to tlabaj/patternfly-react that referenced this issue Dec 12, 2019
@tlabaj tlabaj modified the milestones: Prioritized Backlog, 2019.11 Dec 12, 2019
jschuler pushed a commit that referenced this issue Dec 13, 2019
…3402)

* fix(Table): Fix the ActionColum to allow a link in the actions menu

#3392

* fix typo
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

Successfully merging a pull request may close this issue.

2 participants