Table Widget hidden() not working

I have a Table Widget on a view page.
On a TextColumn i have the following code:
->icon(fn ($record) => json_decode($record->details)->ConsumerDetails->DeliveryMethod === 'AFH' ? 'heroicon-s-building-storefront' : 'heroicon-s-truck')

->hidden(fn ($record) => json_decode($record->details)->ConsumerDetails->DeliveryMethod === 'AFH')


For some reason the ->icon() is working fine and for ->hidden() i get the error: Attempt to read property "details" on null
Was this page helpful?