FilamentF
Filament3y ago
Nate

Is there a way to intercept the activeTab parameter in the resource table function?

I want to change the table structure depending on the tab that was just clicked. I can get the value after you leave the tab using $table->getLivewire()->activeTab (as the tab is probably only available after the table has rendered).

I would like to do something like:

public static function table(Table $table): Table
{
  if ($activeTab === 'Tab One') {
    return (new TableConfigurationOne($table));
  } // and more...
  
  return (new TableConfigurationDefault($table));
}


TIA
Was this page helpful?