F
Filament9mo ago
nowak

How to poll the panel filter tabs when getDefaultActiveTab is dynamic and time based?

In my resources List page I have added my public function getTabs(): array {} method, and this getDefaultActiveTab() method:
public function getDefaultActiveTab(): string | int | null
{
$activeMealType = MealType::getActiveMealType();
return strtolower($activeMealType->name);
}
public function getDefaultActiveTab(): string | int | null
{
$activeMealType = MealType::getActiveMealType();
return strtolower($activeMealType->name);
}
Which changes based on time, but the List page does not refresh or poll the active tab by default when the $activeMealType changes. Is it possibly to add poll the default active tab when using filter tabs, to make sure it live updates?
2 Replies
Vector
Vector9mo ago
Yes, you can achieve live updates of the default active tab by using a polling mechanism. In many frontend frameworks, this is done by periodically sending requests to check for changes in the data. I can help you. give me dm.
nowak
nowakOP9mo ago
I am looking for a way to do this within filament, if possible.
Want results from more Discord servers?
Add your server