Skip to content

Commit 1236188

Browse files
committed
bug #2891 [LiveComponent] Update css to cover more data-loading use cases (Axel Barlet)
This PR was merged into the 2.x branch. Discussion ---------- [LiveComponent] Update css to cover more data-loading use cases | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Docs? | no | License | MIT This update fixes the default display of loaders in Live Components by extending the CSS selector to also target attributes like `data-loading="action(saveForm)|show"` or `data-loading="delay(500)|show"` or even both combined. This ensures that loaders remain hidden on initial render or dynamic component insertion, preventing unwanted visual flashes or unwanted displaying of the element that should not be displayed. Example Previously, an element like `<span data-loading="action(save)|show">Loading…</span>` could be visible in some cases, like loading a new stimulus controller when the component refresh. It doesn't change the previous behavior, it just covers more cases. Commits ------- 814af47 [LiveComponent] Update css to cover more data-loading use cases
2 parents 90ad404 + 814af47 commit 1236188

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[data-loading=""],[data-loading=show],[data-loading=delay\|show]{display:none}
1+
[data-loading=""],[data-loading=show],[data-loading*=\|show]{display:none}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[data-loading=""], [data-loading="show"], [data-loading="delay|show"] {
1+
[data-loading=""], [data-loading="show"], [data-loading*="|show"] {
22
display: none;
33
}

0 commit comments

Comments
 (0)