From 2ad9ef3ab39a8242e1837692fcd432a6ddb46379 Mon Sep 17 00:00:00 2001 From: Konstantin Gogov Date: Thu, 8 May 2025 17:44:26 +0300 Subject: [PATCH] docs(ui5-li): clarify usage and limitations of default slot Fixes: #11489 --- packages/main/src/ListItemStandard.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/main/src/ListItemStandard.ts b/packages/main/src/ListItemStandard.ts index 71b240fc7e41..8a48db5826e5 100644 --- a/packages/main/src/ListItemStandard.ts +++ b/packages/main/src/ListItemStandard.ts @@ -42,11 +42,13 @@ type ExpandableTextTemplate = (this: ListItemStandard, params: ExpandableTextTem * @csspart delete-button - Used to style the button rendered when the list item is in delete mode * @csspart radio - Used to style the radio button rendered when the list item is in single selection mode * @csspart checkbox - Used to style the checkbox rendered when the list item is in multiple selection mode - * @slot {Node[]} default - Defines the text of the component. + * @slot {Node[]} default - Defines the custom formatted text of the component. * - * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.
- * **Note:** Deprecated since version `2.10.0`. Use the `text` property instead.
- * Only use the default slot if you need to apply custom text formatting with HTML elements (like ``, ``, etc.). + * **Note:** Strongly recommended to use the `text` property for optimal wrapping and consistent layout.
+ * Use the `default` slot **only** when you need to apply custom formatting using HTML elements (e.g. ``, ``, etc.). + * Keep in mind that when using custom formatted content via the `default` slot, the wrapping functionality (enabled via `wrappingType="Normal"`) may not work as expected. + * + * If both `text` and `default` slot are used, the `text` property takes precedence. * @constructor * @extends ListItem * @public