Table class is the foundation for building interactive data tables in Filament. It provides functionality for displaying records, searching, filtering, sorting, pagination, bulk actions, and more.
Namespace
Inheritance
Extends:Filament\Support\Components\ViewComponent
Static Methods
make()
Create a new table instance.HasTable
The Livewire component that implements the
HasTable contract.static
Returns the configured table instance.
Configuration Methods
The Table class uses multiple traits that provide configuration methods:Columns
Filters
Actions
Bulk Actions
Header Actions
Search and Filtering
searchable()
Enable global search.searchPlaceholder()
Set the search input placeholder.searchOnBlur()
Only search when the input loses focus.searchDebounce()
Set the search debounce delay.Sorting
defaultSort()
Set the default sort column and direction.Pagination
paginated()
Enable pagination.defaultPaginationPageOption()
Set the default number of records per page.paginationPageOptions()
Set the available page size options.Query Modification
query()
Modify the Eloquent query.modifyQueryUsing()
Modify the query using a callback.Empty State
emptyStateHeading()
Set the empty state heading.emptyStateDescription()
Set the empty state description.emptyStateIcon()
Set the empty state icon.emptyStateActions()
Set actions for the empty state.Display Options
striped()
Enable striped rows.poll()
Automatically refresh the table.deferLoading()
Defer loading until the table is visible.Record Grouping
groupingDirectionSettingHidden()
Hide the grouping direction setting.Reordering
reorderable()
Enable drag-and-drop reordering.Constants
LOADING_TARGETS
Livewire loading targets for the table.Traits
The Table class uses multiple traits for functionality:BelongsToLivewire- Livewire component relationshipCanBeStackedOnMobile- Mobile stacking supportCanBeStriped- Striped rowsCanDeferLoading- Deferred loadingCanGroupRecords- Record groupingCanPaginateRecords- PaginationCanPollRecords- Auto-refresh pollingCanReorderRecords- Drag-and-drop reorderingCanSearchRecords- Search functionalityCanSortRecords- Column sortingCanSummarizeRecords- Record summariesHasActions- Row actionsHasArguments- Table argumentsHasBulkActions- Bulk actionsHasColumnManager- Column visibility managementHasColumns- Column configurationHasContent- Content customizationHasEmptyState- Empty state configurationHasFilterIndicators- Filter indicatorsHasFilters- Filter configurationHasHeader- Header customizationHasHeaderActions- Header actionsHasHeadings- Heading configurationHasQuery- Query modificationHasQueryStringIdentifier- Query string supportHasRecordAction- Default record actionHasRecordActions- Record action configurationHasRecordClasses- Custom record classesHasRecords- Record managementHasRecordUrl- Record URL generationHasToolbarActions- Toolbar actions
Related Classes
- Column - Table columns
- Filter - Table filters
- Action - Table actions
- BulkAction - Bulk actions