JSON TextColumn formatStateUsing badge repeats

I am trying to show a badge for my JSON column. Everything works properly, but it repeats based on how many entries I have.

I tried using limitList() however it will say "and X more".

Tables\Columns\TextColumn::make('attachments')
                    ->formatStateUsing(fn ($state) => $state != null ? 'Attachment' : "")
                    ->badge(),


Any help is appreciated πŸ™‚
Solution
->state(fn ($record): string => $record->attachments ? 'Attachments' : '')
->badge()

?
Was this page helpful?
JSON TextColumn formatStateUsing badge repeats - Filament