fix(overview): center empty state messages and disable scroll when list is empty
CI / Build & Test (push) Successful in 2m55s

Add ov-empty CSS class to .ov-scroll-area when an overview list has no
items — disables overflow scrolling and uses flexbox to vertically and
horizontally center the empty message. Class is removed automatically
when data is present. Keeps the normal scrollable layout intact for
populated lists.
This commit is contained in:
Raven Scott
2026-03-01 02:23:59 -05:00
parent dab9731573
commit 5e40b14a91
2 changed files with 17 additions and 0 deletions
+3
View File
@@ -18,6 +18,7 @@ class OvList {
this.sentinel = $(sentinelId);
this.searchEl = $(searchId);
this.subtitleEl = $(subtitleId);
this.scrollArea = this.body?.closest('.ov-scroll-area') || null;
this.rowFn = rowFn;
this.emptyMsg = emptyMsg;
this.cols = cols;
@@ -66,8 +67,10 @@ class OvList {
this.body.innerHTML = '';
if (this.filtered.length === 0) {
this.body.innerHTML = `<tr><td colspan="${this.cols}" class="empty">${this.emptyMsg}</td></tr>`;
this.scrollArea?.classList.add('ov-empty');
return;
}
this.scrollArea?.classList.remove('ov-empty');
this._appendPage();
}