issue with hiddenOn on Table Filter
Hi all,
I have an issue with hiddenOn on Table Filter which seems to not working for me. On my resource table I have :
->filters([
Tables\Filters\Filter::make('only_top_level_teams')
->query(fn (Builder $query): Builder => $query->where('parent_team_id', null))
->default()
->hiddenOn(SubTeamsRelationManager::class)
])
On the resource page :
public static function getRelations(): array
{
return [
RelationGroup::make('Contacts', [
RelationManagers\SubTeamsRelationManager::class,
RelationManagers\TimeslotsRelationManager::class,
]),
];
}
On the relation page :
class SubTeamsRelationManager extends RelationManager
{
protected static string $relationship = 'sub_teams';
public function form(Form $form): Form
{
return TeamResource::form($form);
}
public function table(Table $table): Table
{
return TeamResource::table($table);
}
}
Anyone figured out why ? thx2 Replies
Have you imported the
SubTeamsRelationManager
class?Hi ! no only RelationManagers\SubTeamsRelationManager...my bad π΅βπ« thx !