fix: use line-clamp in columns to handle text overflow (#17912)

* fix: adjust TextColumn state item markup to wrap content in <p> and improve attribute handling

* fix: code style

* fix: retain the most simplified dom
This commit is contained in:
WenRenHai
2025-09-23 11:09:30 +01:00
committed by GitHub
parent 9fb16f1819
commit 8ecceaef3d
+3 -2
View File
@@ -347,7 +347,8 @@ class TextColumn extends Column implements HasEmbeddedView
if (
($stateCount === 1) &&
(! $isBulleted) &&
(! $hasDescriptions)
(! $hasDescriptions) &&
(! $lineClamp)
) {
$stateItem = Arr::first($state);
[
@@ -363,7 +364,7 @@ class TextColumn extends Column implements HasEmbeddedView
->merge($stateItemAttributes->getAttributes(), escape: false)
->toHtml() ?>>
<?php if ($isBadge) { ?>
<span <?= $stateItemBadgeAttributes->toHtml() ?>>
<span <?= $stateItemBadgeAttributes->toHtml() ?>>
<?php } ?>
<?= $stateItemIconBeforeHtml ?>