Reorderable button does not update automatically {hide/show} when the condition argument changes

I have this code in my resource class
public static function table(Table $table): Table
{
return $table
->reorderable('order_index', function ($livewire) {
return $livewire->activeTab !== 'all';
})
->columns([
...
])
->filters([
//
])
->actions([
...
])
->bulkActions([
//
]);
}
public static function table(Table $table): Table
{
return $table
->reorderable('order_index', function ($livewire) {
return $livewire->activeTab !== 'all';
})
->columns([
...
])
->filters([
//
])
->actions([
...
])
->bulkActions([
//
]);
}
And I have this code in my ListRecords class
public function getTabs(): array
{
return [
'all' => Tab::make('All Violations'),
'user' => Tab::make('User Violations')
->modifyQueryUsing(fn($query) => $query->where('entity', 'user')),
'status' => Tab::make('Status Violations')
->modifyQueryUsing(fn($query) => $query->where('entity', 'status')),
];
}
public function getTabs(): array
{
return [
'all' => Tab::make('All Violations'),
'user' => Tab::make('User Violations')
->modifyQueryUsing(fn($query) => $query->where('entity', 'user')),
'status' => Tab::make('Status Violations')
->modifyQueryUsing(fn($query) => $query->where('entity', 'status')),
];
}
When I change the tab, I want the reorder button to appear only if the tab is not equal to all. The reorder button is always hidden.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server