fix(17): return TabloOverviewTabFragment on HX-Request for overview tab
TabloDetailHandler was always rendering the full page regardless of HX-Request, causing HTMX to swap the entire layout (sidebar, header) into #tab-content instead of just the overview fragment. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d8e52f695b
commit
bc3d8e6355
1 changed files with 4 additions and 0 deletions
|
|
@ -218,6 +218,10 @@ func TabloDetailHandler(deps TablosDeps) http.HandlerFunc {
|
|||
sidebarTablos = []sqlc.Tablo{}
|
||||
}
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
if r.Header.Get("HX-Request") == "true" {
|
||||
_ = templates.TabloOverviewTabFragment(tablo, csrf.Token(r)).Render(r.Context(), w)
|
||||
return
|
||||
}
|
||||
_ = templates.TabloDetailPage(user, csrf.Token(r), "", sidebarTablos, tablo, tasks, nil, templates.EtapeTaskCounts{}, templates.EtapeFilter{}, nil, templates.EventsCalendar{}, templates.DiscussionTabData{}, "overview").Render(r.Context(), w)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue