conditioning using activeTab not working as expected

I was expecting that when having this conditioning will not show only on "All" tab. However, it shows on every tabs. I am wondering what I did wrong where. thank you..
Tables\Columns\TextColumn::make('original_name')
->hidden(fn ($livewire) => $livewire->activeTab !== 'All')
->searchable(),
Tables\Columns\TextColumn::make('original_name')
->hidden(fn ($livewire) => $livewire->activeTab !== 'All')
->searchable(),
ListPage.php
public function getTabs(): array
{

$tabs = [
null => Tab::make('All'),
];

$items = [
'Category' => 'categories',
'Document' => 'documents',
];

foreach ($items as $key => $item) {
$tabs["With $key"] = Tab::make()->query(function ($query) use ($item) {
$query->whereHas($item)->with([
$item => function ($categoryQuery) {
$categoryQuery->orderBy('updated_at', 'desc');
},
]);
});
}

return $tabs;
}
public function getTabs(): array
{

$tabs = [
null => Tab::make('All'),
];

$items = [
'Category' => 'categories',
'Document' => 'documents',
];

foreach ($items as $key => $item) {
$tabs["With $key"] = Tab::make()->query(function ($query) use ($item) {
$query->whereHas($item)->with([
$item => function ($categoryQuery) {
$categoryQuery->orderBy('updated_at', 'desc');
},
]);
});
}

return $tabs;
}
No description
Solution:
You used null as a Key for the "All" tab not "All".
Jump to solution
2 Replies
Solution
Dennis Koch
Dennis Koch3mo ago
You used null as a Key for the "All" tab not "All".
Rolland
Rolland3mo ago
I looked like a fool now. but thank you..
Want results from more Discord servers?
Add your server