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(),
            ])
//...
 ```
This commit is contained in:
Chris Brown
2023-09-03 22:01:49 -04:00
committed by GitHub
parent 64a33c8711
commit 2fef68b2e1
@@ -50,7 +50,11 @@
}}
>
@if (filled($descriptionAbove))
<p class="text-sm text-gray-500 dark:text-gray-400">
<p
@class([
'text-sm text-gray-500 dark:text-gray-400',
'whitespace-normal' => $canWrap,
])>
{{ $descriptionAbove }}
</p>
@endif
@@ -184,7 +188,11 @@
</{{ $isListWithLineBreaks ? 'ul' : 'div' }}>
@if (filled($descriptionBelow))
<p class="text-sm text-gray-500 dark:text-gray-400">
<p
@class([
'text-sm text-gray-500 dark:text-gray-400',
'whitespace-normal' => $canWrap,
])>
{{ $descriptionBelow }}
</p>
@endif