-
Notifications
You must be signed in to change notification settings - Fork 22
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
KTabs links functionality #2546
Comments
Updating the hash of the URL is subjective based on the implementation in the host app, meaning that I wouldn't expect the Kongponent to update the URL's
For this, I believe some logic could be added. In digging in here, I also noticed the @portikM I think the |
Thanks @adamdehaven !
Just to make sure I understand and I've explained myself properly. Note: I'm wondering specifically about using KTabs with it's anchor support, not using KTabs with it's button support. Are you saying that even when using KTabs with anchor links (not buttons), by default I should still manage the URLs via my own javascript events as opposed to using the native anchor functionality? If I don't want the URL to change when clicking a tab wouldn't it be a better choice to use buttons for the KTabs? https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#onclick_events
Note the bolding/emphasis is added in the linked article, its not my own addition. What's your take on the above MDN link? Aside from whether the anchors should change the URL or not, shouldn't they do so consistently? i.e. If I click on a tab and it changes the URL, then I would have assumed tabbing to and hitting enter on the same tab should also follow the same behaviour? Do you follow what I'm saying?
I was wondering how possible it would be to remove the javascript events entirely when anchors are being used, and just depend on the native anchor functionality to update the URL. Then leave it to the consuming application to set the selected tab depending on what's in the URL. If the consuming application does not want to update the URL they could just use the existing "KTabs with buttons" functionality, but I would believe a very large percentage of folks probably want the "KTabs with anchors to change the URL" functionality. @portikM would be good to hear your insights here also. |
hi there 👋
I saw that functionality was added to KTabs to be able to use links for the KTab buttons.
I noticed a couple of issues with this functionality, I think both issues are noticeable here:
https://kongponents.konghq.com/components/tabs.html#tabs-as-links
#tab-link-1
,#tab-link-2
but the URL of the page doesn't.lmk if you need more info 👍
The text was updated successfully, but these errors were encountered: