Skip to content

Fix spinning loader when expired is the only contract tab#145

Merged
DanSheps merged 2 commits into
DanSheps:mainfrom
jsenecal:fix/144-expired-tab-spinner
Mar 26, 2026
Merged

Fix spinning loader when expired is the only contract tab#145
DanSheps merged 2 commits into
DanSheps:mainfrom
jsenecal:fix/144-expired-tab-spinner

Conversation

@jsenecal
Copy link
Copy Markdown
Collaborator

Fixes #144

The expired contracts tab uses hx-trigger="click once" to lazy-load its content. When expired is the only tab, it gets auto-selected as the default -- but the click event never fires since the tab was activated programmatically. The spinner stays forever.

Changed the trigger to load when expired is the only tab so the content loads immediately on render. When other tabs exist, it still lazy-loads on click as before.

Affects both device and VM contract templates.

When a device or VM has only expired contracts, the Expired tab is
auto-selected as the default active tab. However, its content was
loaded via hx-trigger="click once", which never fires because the tab
was selected programmatically, not clicked. Changed the trigger to
use "load" when expired is the only tab so content loads immediately.
@DanSheps DanSheps merged commit 8f751d8 into DanSheps:main Mar 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spinning loading icon on 4.5 / 1.1.8

2 participants