Skip to content

Commit

Permalink
fix: fix template dashbord default value
Browse files Browse the repository at this point in the history
  • Loading branch information
nichenqin committed Dec 5, 2024
1 parent d807e88 commit cd29a27
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
let dashboards = t.flatMap((base) => base.dashboards)
let bases = t.map((base) => base.base)
let currentTableId = writable<string | undefined>(tables.at(0)?.id.value)
let currentTableId = writable<string | undefined>(dashboards.length ? undefined : tables.at(0)?.id.value)
let currentViewId = writable<string | undefined>(undefined)
let currentDashboardId = writable<string | undefined>(undefined)
let currentDashboardId = writable<string | undefined>(dashboards.length ? dashboards.at(0)?.id.value : undefined)
let currentTable = derived(currentTableId, ($currentTableId) => {
return tables.find((table) => table.id.value === $currentTableId)
})
Expand Down

0 comments on commit cd29a27

Please sign in to comment.