F
Filament5mo ago
Hugo

Cannot press save changes button because of tabs in the form?

I am having a weird interaction in my edit form. I have a few tabs in my form where those tabs show different tables. For some odd reason, if I comment out those tabs or I just remove the table from the tab schema the save changes button works again. Those tabs have nothing to do nor will save anything alongside the form, they just show different tables where you can manage visibility of certain records. I'll follow up in the comments with code.
2 Replies
Hugo
Hugo5mo ago
These are the tabs I have in my form. For example, the bilings tab alone will give me no problem when trying to save changes if I comment out the other tabs, but when the other tabs are not commented the button just becomes unclickable. Any thoughts?
Tab::make('bilings')
->label(__('crud.clients.tabs.invoices'))
->schema([]),
Tab::make('recap')
->label(__('crud.clients.tabs.recaps'))
// ->hidden(fn(string $operation) => $operation === 'create')
->schema([
ClientAreaPermissionsRecapDocumentsTableField::make('client_recap_documents')
->label('')
]),
Tab::make('cleanings')
->label(__('crud.clients.tabs.cleanings'))
// ->hidden(fn(string $operation) => $operation === 'create')
->schema([
ClientAreaPermissionsCleaningsTableField::make('client_cleanings')
->label('') ]), Tab::make('event_history')->label(__('crud.clients.tabs.event_history')) // ->hidden(fn(string $operation) => $operation === 'create')->schema([ ClientAreaPermissionsEventHistoryTableField::make('event_history')->label('') ])
Tab::make('bilings')
->label(__('crud.clients.tabs.invoices'))
->schema([]),
Tab::make('recap')
->label(__('crud.clients.tabs.recaps'))
// ->hidden(fn(string $operation) => $operation === 'create')
->schema([
ClientAreaPermissionsRecapDocumentsTableField::make('client_recap_documents')
->label('')
]),
Tab::make('cleanings')
->label(__('crud.clients.tabs.cleanings'))
// ->hidden(fn(string $operation) => $operation === 'create')
->schema([
ClientAreaPermissionsCleaningsTableField::make('client_cleanings')
->label('') ]), Tab::make('event_history')->label(__('crud.clients.tabs.event_history')) // ->hidden(fn(string $operation) => $operation === 'create')->schema([ ClientAreaPermissionsEventHistoryTableField::make('event_history')->label('') ])
Hugo
Hugo5mo ago
for readability purposes, here is a screenshot of how the code looks.Every TableField you see is a Filament Field that will then use a livewire component where I make my tables using the filament tables.
No description