-
Notifications
You must be signed in to change notification settings - Fork 842
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
[EuiListGroupItem] Allow onClick
with href
#1668
Comments
@flash1293 Can you explain a situation when you'd need both. It seems to me that they'd conflict with each other. Is it a link or a button?
|
Edited above |
@cchaos It is necessary for the "Open Search" panel in discover - it's a link but the flyout closes on click. |
So you're saying that you're providing an Sounds to me that you need to just provide an |
Agree with @cchaos here. |
But if I do this, I can't do "open in new tab" from this item. |
You should be able to with |
What I meant is that the user is able to decide whether they want to open the link in a new tab or the same tab. Either way I want to trigger some side effect (in this case closing a flyout) as a response to the navigating - in this case the navigating doesn't close the flyout even when staying in the same tab. I think it boils down to a pro and a counter argument:
I would lean towards the pro argument since while it might not always be the cleanest way to use |
We ran through this as a group today in our design meeting. We'd like to keep Suggestion for now would be that if you need this kind of functionality to just use a secondary icon next to the link to suggest opening it in another tab and using a separate action. |
fwiw I am hitting this need as well. I think it may be become more common because you should use Drilldown code needs this as well. Both onClick and href are set on |
Let's go ahead an implement allowing both |
We'll need to update the eslint plugin to include EuiListGroupItems, and then make sure to publish that package and update it in Kibana.
|
onClick
with href
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment. |
Bumping this - it’s still valid. There’s a workaround on Kibana side, but it would be nice to have it supported natively |
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment. |
Added a skip so the bot doesn't engage. |
This appears to be have been resolved in #1933. I can't reproduce it in latest prod at least - passing both Edit: I also don't see a type error for passing both |
It isn't possible to provide both
href
andonClick
to anEuiListGroupItem
element - theonClick
prop will be ignored.The text was updated successfully, but these errors were encountered: