luilliarcec / filament-table-repeater

A modified version of the Filament Forms Repeater to display it as a table.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Filament Table Repeater Plugin

Latest Version on Packagist GitHub Code Style Action Status Total Downloads

screenshot in dark mode

screenshot in light mode

Installation

You can install the package via composer:

composer require awcodes/filament-table-repeater

Usage

This field has most of the same functionality of the Filament Repeater field. The main exception is that this field can not be collapsed.

TableRepeater::make('social')
    ->schema([
        Select::make('platform')
            ->disableLabel()
            ->options([
                'facebook' => 'Facebook',
                'twitter' => 'Twitter',
                'instagram' => 'Instagram'
            ]),
        TextInput::make('handle')
            ->disableLabel(),
    ])
    ->columnSpan('full')

By default, Table Repeater will automatically create the table headers from your schema labels. This can be overridden by simply passing an array of your desired headers to the ->headers() method.

TableRepeater::make('social')
    ->headers(['Platform', 'Handle'])
    ->schema([
        ...
    ])
    ->columnSpan('full')

Labels

To automatically hide all the labels of the fields in the table use the ->hideLabels() method.

TableRepeater::make('social')
    ->hideLabels()
    ->schema([
        ...
    ])

Themeing

If you are using a custom theme for Filament you will need to add this plugin's views to your Tailwind CSS config.

content: [
    ...
    "./vendor/awcodes/filament-table-repeater/resources/views/**/*.blade.php",
],

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.

About

A modified version of the Filament Forms Repeater to display it as a table.

License:MIT License


Languages

Language:Blade 67.6%Language:PHP 24.8%Language:CSS 4.0%Language:JavaScript 3.6%