Hide Column Based on Active Group?

What is the easiest way to achieve something like this:
Tables\Columns\TextColumn::make('affiliate_name')
    ->label('Affiliate')
    ->hidden(fn() => $table->getActiveGroup() === 'affiliate_name')
Was this page helpful?