From b32adf50e6398f8677edcbcd9f7d80dafb55ae43 Mon Sep 17 00:00:00 2001 From: Plamen Ivanov Date: Fri, 26 Jul 2024 15:24:27 +0300 Subject: [PATCH] fix(ui5-list): improved loading state (#9520) * fix(ui5-list): improved loading state Loading state wasn't displayed properly. This change adapts the list to the busy indicator and fixes the issue. Fixes: #9476 --- packages/main/src/List.hbs | 20 +++++++------------- packages/main/src/List.ts | 16 ---------------- packages/main/src/themes/List.css | 25 +++---------------------- 3 files changed, 10 insertions(+), 51 deletions(-) diff --git a/packages/main/src/List.hbs b/packages/main/src/List.hbs index a2c07e7714d6..cb17edb08381 100644 --- a/packages/main/src/List.hbs +++ b/packages/main/src/List.hbs @@ -16,6 +16,12 @@ @ui5-_selection-requested={{onSelectionRequested}} @ui5-_focus-requested={{onFocusRequested}} > +
{{! header}} {{#if header.length}} @@ -66,23 +72,11 @@
- - {{#if loading}} -
- -
- {{/if}} - +
diff --git a/packages/main/src/List.ts b/packages/main/src/List.ts index 88a8ca319fb0..c696cbe470b9 100644 --- a/packages/main/src/List.ts +++ b/packages/main/src/List.ts @@ -715,22 +715,6 @@ class List extends UI5Element { return this.growingButtonText || List.i18nBundle.getText(LOAD_MORE_TEXT); } - get loadingIndPosition() { - if (!this.grows) { - return "absolute"; - } - - return this._inViewport ? "absolute" : "sticky"; - } - - get styles() { - return { - loadingInd: { - position: this.loadingIndPosition, - }, - }; - } - get listAccessibleRole() { return this.accessibleRole.toLowerCase(); } diff --git a/packages/main/src/themes/List.css b/packages/main/src/themes/List.css index 7601dec9317c..31aab2cce904 100644 --- a/packages/main/src/themes/List.css +++ b/packages/main/src/themes/List.css @@ -16,28 +16,8 @@ border-bottom: 0; } -:host([loading]) { - opacity: 0.72; -} - -:host([loading]) .ui5-list-loading-row { - position: absolute; - left: 0; - right: 0; - bottom: 0; - top: 0; - outline: none; -} - -:host([loading]) .ui5-list-loading-ind { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - z-index: 1; -} - -.ui5-list-root { +.ui5-list-root, +.ui5-list-busy-indicator { width: 100%; height: 100%; position: relative; @@ -47,6 +27,7 @@ .ui5-list-scroll-container { overflow: auto; height: 100%; + width: 100%; } .ui5-list-ul {