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
wrap() doesnt control the width afaik
it just means that we use
whitespace-normal
class in the view@Dan Harrin please explain this i want exact functionailty of wrap or or how to control width ?
controlling width is nothing to do with wrapping
width is calculated by the browser based on the table contnet
like any html table
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 ?
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'])
@Dan Harrin ok thanks