Default active tab

I want to turn a tab default, i've already used ->default() and -isActive() and it doesn´t work
No description
14 Replies
raissa_black
raissa_blackOP2mo ago
mine it's a table, and second option does not worked, it doesn't even show an error
Lara Zeus
Lara Zeus2mo ago
what is the error? can you shar the code? what class?
raissa_black
raissa_blackOP2mo ago
No description
LeandroFerreira
LeandroFerreira2mo ago
this works if you are using a Resource
raissa_black
raissa_blackOP2mo ago
I'm using ListOwner
Lara Zeus
Lara Zeus2mo ago
I can confirm its working fine, are you on the last version of filament, not sure of its related!
No description
No description
LeandroFerreira
LeandroFerreira2mo ago
You are showing teste.php file share the whole code you are using
raissa_black
raissa_blackOP2mo ago
I found the error!! It was because of this code that i could not do it. count() method is already defined by default: protected array $orderByStatuses = []; protected int $countNew = 0; public function mount(): void { $this->countNew = Owner::where('status', 'new')->count(); }
LeandroFerreira
LeandroFerreira2mo ago
you mean mount method?
raissa_black
raissa_blackOP2mo ago
yes!
LeandroFerreira
LeandroFerreira2mo ago
use
public function mount(): void
{
parent::mount();

//your code here
}
public function mount(): void
{
parent::mount();

//your code here
}
raissa_black
raissa_blackOP2mo ago
i just deleted the code i showed before and added that code from the documentation, and it worked thanks
Want results from more Discord servers?
Add your server