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_blackOP5mo ago
mine it's a table, and second option does not worked, it doesn't even show an error
Lara Zeus
Lara Zeus5mo ago
what is the error? can you shar the code? what class?
raissa_black
raissa_blackOP5mo ago
No description
LeandroFerreira
LeandroFerreira5mo ago
this works if you are using a Resource
raissa_black
raissa_blackOP5mo ago
I'm using ListOwner
Lara Zeus
Lara Zeus5mo 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
LeandroFerreira5mo ago
You are showing teste.php file share the whole code you are using
raissa_black
raissa_blackOP5mo 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
LeandroFerreira5mo ago
you mean mount method?
raissa_black
raissa_blackOP5mo ago
yes!
LeandroFerreira
LeandroFerreira5mo ago
use
public function mount(): void
{
parent::mount();

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

//your code here
}
raissa_black
raissa_blackOP5mo ago
i just deleted the code i showed before and added that code from the documentation, and it worked thanks

Did you find this page helpful?