Closed ZsharE closed 2 years ago
Hello,
this seems to be caused by the default browser scroll behavior, as you've pointed out.
Prop options.disableScrollBehavior
has been added to the Tabs
component which can disable this (without needing to disable the hash completely via useUrlFragment
).
Version 1.1.1 has been released which contains this new feature.
When you create some tabs you will need to specify the name for each tab. This will add an id for each tab, which is similar with the name provided. In the example below, the profile tab will have the id #profile, security tab will have the id #security, and so on. So far good. When you land from another application page to a page that contains tabs, and you specify the #hash in the URL or not (but the defaultTabHash is set), the page will scroll to that section (which is perfectly normal).
Is there a way to set
window.scrollTo({ top : 0 })
after the tab is shown or set, or ... ? I tried to addwindow.scrollTo({ top : 0 })
to the changed callback, but this is not working. Any idea ?