how to use ->wrap() in ViewColumn

Hi Can any one help me how to use ->wrap() in ViewColumn if i use it throws Method Filament\Tables\Columns\ViewColumn::wrap does not exist. and if use in blade file php function wordwrap($str,15,"<br>\n"); this will also have zero affect on the sentence infact add <br> tag after every word in the sentence Thanks also how to control the width of the Custom columns
6 Replies
Dan Harrin
Dan Harrin2y ago
wrap() doesnt control the width afaik it just means that we use whitespace-normal class in the view
Ali Abbas
Ali AbbasOP2y ago
@Dan Harrin please explain this i want exact functionailty of wrap or or how to control width ?
Dan Harrin
Dan Harrin2y ago
controlling width is nothing to do with wrapping width is calculated by the browser based on the table contnet like any html table
Ali Abbas
Ali AbbasOP2y ago
ok @Dan Harrin but is there is way to use https://filamentphp.com/docs/2.x/tables/layout#controlling-column-width-using-a-grid this in Resource to control width ?
Filament
Layout - Table Builder - Filament
The elegant TALL stack table builder for Laravel artisans.
Dan Harrin
Dan Harrin2y ago
its not the same thing custom table layouts use flexbox normal tables use html tables you can try controlling the width of a column like ->extraHeaderAttributes(['style' => 'width: 100px'])
Ali Abbas
Ali AbbasOP2y ago
@Dan Harrin ok thanks
Want results from more Discord servers?
Add your server