Export Column State Not Working

Hi guys,
I have a boolean column in a relationship model and I want to personalize it so true means yes and false means no, however it's not customizing by state on the Exporter class. I'm getting 1 or 0 with or without state, is this a bug or am I doing something wrong?

public static function getColumns(): array { return [ ExportColumn::make('docto.obrigatorio') ->label('Obrigatório') ->state(function (EmpresaDocto $record) { if ($record->docto->obrigatorio === 1) { return 'Sim'; } return 'Não'; }), ]; }
Solution
->formatStateUsing(fn ($state): string => $state === 1 ? 'Sim' : 'Não')
Was this page helpful?