From 2fef68b2e1c9f28d41a7cd3ffc91502bacad5b8a Mon Sep 17 00:00:00 2001 From: Chris Brown Date: Sun, 3 Sep 2023 22:01:49 -0400 Subject: [PATCH] Tables Text-Column: allow Descriptions to wrap In my use-case this was revealed in a RelationManager, but is probably relevant elsewhere too. When adding `->wrap` in the following code, no wrapping was occurring. ```php public function table(Table $table): Table { return $table ->recordTitleAttribute('name') ->columns([ Tables\Columns\TextColumn::make('name') ->description(fn (Category $record): string => $record->description ?? '') ->wrap(), ]) //... ``` --- .../resources/views/columns/text-column.blade.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/tables/resources/views/columns/text-column.blade.php b/packages/tables/resources/views/columns/text-column.blade.php index ae0ab056b5..830af20c1e 100644 --- a/packages/tables/resources/views/columns/text-column.blade.php +++ b/packages/tables/resources/views/columns/text-column.blade.php @@ -50,7 +50,11 @@ }} > @if (filled($descriptionAbove)) -

+

$canWrap, + ])> {{ $descriptionAbove }}

@endif @@ -184,7 +188,11 @@ @if (filled($descriptionBelow)) -

+

$canWrap, + ])> {{ $descriptionBelow }}

@endif