Merge pull request #10200 from supabase/fix/ui-tabs-external-link

default active tab to first panel if present, otherwise uses url hash
This commit is contained in:
Terry Sutton authored and GitHub committed 2022-11-09 08:19:26 -03:30
commit 5fbf004020
1 file changed
+2 -2
+2 -2
View File
@@ -55,8 +55,8 @@ function Tabs({
let __styles = styleHandler('tabs')
// activeId state can be overriden externally with `active`
// defaults to use a url #hash if we have one or activeTab if not
const active = activeId ? activeId : hash ? hash : activeTab
// defaults to the first panelif we have one or url hash if not
const active = activeId ? activeId : activeTab ? activeTab : hash
function onTabClick(id: string) {
const newTabSelected = id !== active