Skip to content

martinmildner/filament-table-repeater

 
 

Repository files navigation

Repeater Component in Table layout for Filament Package

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is a package for Filament form component. Extends from Repeater, but display in Table Layout.

image

Installation

You can install the package via composer:

composer require icetalker/filament-table-repeater

You can publish the views using

php artisan vendor:publish --tag="filament-table-repeater-views"

Usage

use Icetalker\FilamentTableRepeater\Forms\Components\TableRepeater;

protected function getFormSchema(): array
{
    return [
        ...
        Forms\Components\Grid::make(1)->schema([

            TableRepeater::make('items')
                ->relationship('items')
                ->schema([
                    Forms\Components\TextInput::make('product'),
                    ...
                ])
                ->collapsible()
                ->defaultItems(3),

        ]),

    ];
}

Since this component extends from Filament\Forms\Components\Repeater, you can use most of its methods, except for a few methods like inset(), grid(), columns().

Testing

composer test

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

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%