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

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

//your code here
}
raissa_black
raissa_blackOP3mo 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