Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

default active tab to first panel if present, otherwise uses url hash

Francisco Mazzoni3275b9e47a16
diff --git a/packages/ui/src/components/Tabs/Tabs.tsx b/packages/ui/src/components/Tabs/Tabs.tsx
index da9de69154f..9145c37d776 100644
--- a/packages/ui/src/components/Tabs/Tabs.tsx
+++ b/packages/ui/src/components/Tabs/Tabs.tsx
@@ -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