mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user