mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
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:
1 file changed
+2
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user