Default active tab
I want to turn a tab default, i've already used ->default() and -isActive() and it doesn´t work
14 Replies
how about
->activeTab(2)
🙂
https://filamentphp.com/docs/3.x/forms/layout/tabs#setting-the-default-active-tabmine it's a table, and second option does not worked, it doesn't even show an error
what is the error?
can you shar the code? what class?
this works if you are using a Resource
I'm using ListOwner
I can confirm its working fine, are you on the last version of filament, not sure of its related!
You are showing
teste.php
file
share the whole code you are usingI 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();
}
you mean mount method?
yes!
use
i just deleted the code i showed before and added that code from the documentation, and it worked
thanks