Table Repeater
CommunityA modified version of the Filament Forms Repeater to display it as a table.
Author:
Adam Weston
Package health
BetaAutomated checks of this plugin's Composer package
15 checks
- Failed: GitHub Actions pinned to SHA — View details on Plumb
- Skipped: GitLab CI includes pinned to SHA
- Passed: Open security advisories
- Passed: Dependabot PR responsiveness — No open Dependabot PRs.
- Skipped: Renovate MR responsiveness
- Warning: Dependabot or Renovate configured — Updater does not cover the JavaScript ecosystem, which has a committed lockfile.
-
Failed:
Dependency update cooldown configured
—
No cooldown configured in
.github/dependabot.yml. View details on Plumb - Passed: Provides a security policy
- Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
- Passed: Commit and release recency — Active: last commit 5 days ago; last release 201 days ago.
-
Passed:
composer.lock not committed by library
—
composer.lockis absent from the released dist archive. - Passed: Dist archive is lean
-
Passed:
Current Laravel version supported
—
Package dependencies resolve together with current Laravel
13.0. -
Passed:
Current PHP version supported
—
Constraint
^8.1supports current PHP8.5. - Skipped: Current Symfony version supported
filament/
namespace. Review the source and install at your own risk. Found
malware or an unresolved security issue the author won't
address?
Report it
.
Documentation
- Filament v4
- Upgrade Guide for 2.x to 3.x
- Installation
- Usage
- Changelog
- Contributing
- Security Vulnerabilities
- Credits
- License
[!Warning] This package is deprecated. As of Filament v4 the native Repeater covers the use case of this package and it is not needed anymore.
#Filament v4
[!NOTE] In Filament v4, Table Repeaters are built into Core. For more information, see the Filament documentation.
#Upgrade Guide for 2.x to 3.x
- Rename you use statements from
Awcodes\FilamentTableRepeatertoAwcodes\TableRepeater. - Run
npm run buildto update your theme file. - See Headers for changes to the
headers()method.
#Installation
You can install the package via composer:
composer require awcodes/filament-table-repeater
In an effort to align with Filament's theming methodology you will need to use a custom theme to use this plugin.
[!IMPORTANT] If you have not set up a custom theme and are using a Panel follow the instructions in the Filament Docs first. The following applies to both the Panels Package and the standalone Forms package.
- Import the plugin's stylesheet in your theme's css file.
@import '<path-to-vendor>/awcodes/filament-table-repeater/resources/css/plugin.css';
- Add the plugin's views to your
tailwind.config.jsfile.
content: [
'<path-to-vendor>/awcodes/filament-table-repeater/resources/**/*.blade.php',
]
#Usage
This field has most of the same functionality of the Filament Forms Repeater field. The main exception is that this field can not be collapsed.
use Awcodes\TableRepeater\Components\TableRepeater;
use Awcodes\TableRepeater\Header;
TableRepeater::make('users')
->headers([
Header::make('name')->width('150px'),
])
->schema([
...
])
->columnSpan('full')
#Headers
To add headers use the headers() method. and pass in an array of Header components.
use Awcodes\TableRepeater\Header;
TableRepeater::make('users')
->headers([
Header::make('name'),
Header::make('email'),
])
#Header Alignment
To align the headers of the table use the align() method, passing in one of the Filament Alignment enums.
use Filament\Support\Enums\Alignment;
Header::make('name')
->align(Alignment::Center)
#Header Width
To set the width of the headers of the table use the width() method.
Header::make('name')
->width('150px')
#Marking Columns as Required
To mark a column as required use the markAsRequired() method.
Header::make('name')
->markAsRequired()
#Hiding the header
Even if you do not want to show a header, you should still add them to be compliant with accessibility standards. You can hide the header though with the renderHeader() method.
TableRepeater::make('users')
->headers(...)
->renderHeader(false)
#Labels
By default, form component labels will be set to hidden. To show them use the showLabels() method.
TableRepeater::make('users')
->showLabels()
#Empty State Label
To customize the text shown when the table is empty, use the emptyLabel() method.
TableRepeater::make('users')
->emptyLabel('There are no users registered.')
Alternatively, you can hide the empty label with emptyLabel(false).
#Break Point
Below a specific break point the table will render as a set of panels to
make working with data easier on mobile devices. The default is 'md', but
can be overridden with the stackAt() method.
use Filament\Support\Enums\MaxWidth;
TableRepeater::make('users')
->stackAt(MaxWidth::Medium)
#Appearance
If you prefer for the fields to be more inline with the table. You can change the appearance of the table with the streamlined() method.
TableRepeater::make('users')
->streamlined()
#Extra Actions
TableRepeater supports the same extraItemActions() as the native Filament repeater. You may also add extra actions below the table with the extraActions() method. These will appear next to the 'Add' button or in place of the 'Add' button if it is hidden.
TableRepeater::make('users')
->extraActions([
Action::make('exportData')
->icon('heroicon-m-inbox-arrow-down')
->action(function (TableRepeater $component): void {
Notification::make('export_data')
->success()
->title('Data exported.')
->send();
}),
])
#Changelog
Please see CHANGELOG for more information on what has changed recently.
#Contributing
Please see CONTRIBUTING for details.
#Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
#Credits
#License
The MIT License (MIT). Please see License File for more information.
The author
Adam is a full-stack web developer (with a focus on Laravel) who has been coding for close to 20 years. He is a core Filament team member as well and has authored numerous plugins for Filament such as Curator, Tiptap Editor and Table Repeater, to name a few. You can learn more about Adam on his website.
From the same author
Shout
A simple inline contextual notice for Filament Forms, basically just a fancy placeholder.
Author:
Adam Weston
Botly
Botly is a Filament plugin to manage your site's robots.txt file directly from a Filament admin panel.
Author:
Adam Weston
Tiptap Editor
A Rich Text Editor plugin for Filament Forms.
Author:
Adam Weston
Quick Create
Plugin for Filament Panels that adds a dropdown menu to the header to quickly create new items.
Author:
Adam Weston
Featured Plugins
A selection of plugins curated by the Filament team
Custom Dashboards
Let your users build and share their own dashboards with a drag-and-drop interface. Define your data sources in PHP and let them do the rest.
Filament
Spotlight Pro
Browse your Filament Panel with ease. Filament Spotlight Pro adds a Spotlight/Raycast like Command Palette to your Filament Panel.
Dennis Koch
Advanced Tables (formerly Filter Sets)
Supercharge your tables with powerful features like user-customizable views, quick filters, multi-column sorting, advanced table searching, convenient view management, and more. Compatible with Resource Panel Tables, Relation Managers, Table Widgets, and Table Builder!
Kenneth Sese