Using limit with default in datatable textcolumn

I've got a textcolumn with a default HTML column: TextColumn::make('title') ->label('Title') ->sortable() ->searchable() ->default(new HtmlString('<span class="bg-orange-100 text-orange-800 text-sm font-medium me-2 px-2.5 py-1.5 rounded inline-flex"> Missing Information </span>')) I also want to add a 30 character limit, but it seems to prevent the default working.
Solution:
->limit(fn ($record) => $record->title ? 100 : false)
->limit(fn ($record) => $record->title ? 100 : false)
...
Jump to solution
2 Replies
Solution
awcodes
awcodes8mo ago
->limit(fn ($record) => $record->title ? 100 : false)
->limit(fn ($record) => $record->title ? 100 : false)
urbycoz
urbycozOP8mo ago
Perfect. Thanks
Want results from more Discord servers?
Add your server