• Stars
    star
    199
  • Rank 196,105 (Top 4 %)
  • Language
    PHP
  • License
    MIT License
  • Created about 2 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

Table Repeater Plugin

Latest Version on Packagist Total Downloads

table-repeater-og

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.

Note 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.

  1. Import the plugin's stylesheet in your theme's css file.
@import '<path-to-vendor>/vendor/awcodes/filament-table-repeater/resources/css/plugin.css';
  1. Add the plugin's views to your tailwind.config.js file.
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.

TableRepeater::make('social')
    ->schema([
        Select::make('platform')
            ->hiddenLabel()
            ->options([
                'facebook' => 'Facebook',
                'twitter' => 'Twitter',
                'instagram' => 'Instagram'
            ]),
        TextInput::make('handle')
            ->hiddenLabel(),
    ])
    ->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'])

To change the headers alignment use the alignHeaders('center') method.

TableRepeater::make('social')
    ->alignHeaders('center')

Labels

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

TableRepeater::make('social')
    ->hideLabels()

Empty State Label

To customize the text shown when the table is empty, use the emptyLabel() method.

TableRepeater::make('social')
    ->emptyLabel('There is no platform registered.')

Alternatively, you can hide the empty label with emptyLabel(false).

Without Header

Sometimes we don't want to have the table header at all. To achieve this, use the withoutHeader() method.

TableRepeater::make('social')
    ->withoutHeader()

Column Widths

To set the width of columns in the table use the columnWidths() method. Widths should be set in px as a string. For fields that don't have names, such as Actions and Group, you have to give it an explicit id to target.

TableRepeater::make('social')
    ->columnWidths([
        'platform' => '200px',
        'action_field' => '100px',
    ])
    ->schema([
        Select::make('platform'), // will be 200px wide
        TextInput::make('handle'), // will be default stretched width
        Actions::make([
            ...
        ])->id('action_field'), // will be 100px wide
    ])

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 breakPoint() method.

TableRepeater::make('social')
    ->breakPoint('sm') // accepts Tailwind CSS screen sizes

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.

More Repositories

1

filament-curator

A media picker plugin for Filament Panels.
PHP
321
star
2

filament-tiptap-editor

A Rich Text Editor plugin for Filament Forms.
PHP
275
star
3

filament-quick-create

Plugin for Filament Panels that adds a dropdown menu to the header to quickly create new items.
PHP
165
star
4

overlook

An app overview widget for Filament panels.
PHP
158
star
5

filament-badgeable-column

A custom table column that supports prefixed and suffixed badges to the column content.
PHP
118
star
6

drop-in-action

A form component for Filamentphp allowing actions inside of forms.
PHP
86
star
7

alpine-floating-ui

Add Floating UI functionality to Alpine 3.x components.
JavaScript
79
star
8

filament-sticky-header

A Filament Panels plugin to make headers sticky when scrolling.
PHP
60
star
9

shout

A simple inline contextual notice for Filament forms, basically just a fancy placeholder.
PHP
50
star
10

scribble

PHP
43
star
11

filament-versions

A mostly useless package to display framework versions on Filament panels.
PHP
40
star
12

filament-addons

A set of components / fields to extend Filament Admin.
PHP
30
star
13

light-switch

Plugin to add theme switching (light/dark/system) to the auth pages for Filament Panels.
PHP
29
star
14

filament-extras

PHP
28
star
15

filament-gravatar

Replace Filament's default avatar url provider with one for Gravatar.
PHP
26
star
16

recently

Easily track and access recently viewed records in your filament panels.
PHP
22
star
17

repro

CLI tool for quickly recreating reproduction repos locally.
PHP
18
star
18

preset-color-picker

A color picker field for Filament Forms that uses preset color palettes.
PHP
17
star
19

Matinee

OEmbed field for Filament Panel and Form Builders.
PHP
17
star
20

filament-installer

Filament Admin Panel application installer.
PHP
16
star
21

html-faker

A better html faker.
PHP
13
star
22

trov

A Laravel / Filament starter kit for CMS functionality on websites.
PHP
11
star
23

hydro

CLI for creating new Filament plugins
PHP
9
star
24

filament-plugin-purge

A purge tool to keep your Filament plugin from bloating / duplicating Filament's default styles.
CSS
9
star
25

palette

A color picker field for Filament Forms that uses preset color palettes.
PHP
8
star
26

pounce

A global modal/dialog plugin for Filament.
PHP
7
star
27

filament-sentry

A basic auth scaffolding for Filament utilizing Filament Breezy, Filament Shield and custom User Resources.
PHP
7
star
28

filament-oembed

PHP
6
star
29

sink

A collection of components for Filament.
PHP
6
star
30

curator

PHP
4
star
31

translation-field

A form component for Filament to handle translations at the field / input level.
PHP
3
star
32

postal-codes

This is a package to easily install and use postal codes in your Laravel application from GeoNames.org
PHP
3
star
33

tiptap-demo

Project for testing tiptap functionality
PHP
3
star
34

assistant

A collection of helpers for use in Laravel projects.
PHP
2
star
35

dimmer

Blade
2
star
36

trov-components

A set of components, fields and layouts to extend Filament Admin.
PHP
2
star
37

awcodes-astro

Astro
2
star
38

filament-skins

PHP
2
star
39

gtm

Easy integration of Google Tag Manager into your Laravel application.
PHP
2
star
40

trov-installer

PHP
1
star
41

colors-experiment

PHP
1
star
42

pluginshot

AWcodes Plugin Screenshot Generator
PHP
1
star
43

headings

A Custom Form Component to demo building a standalone Forms Builder plugin for Filament
PHP
1
star
44

laravel-remix

Revert a new Laravel application to Laravel Mix.
PHP
1
star
45

trov-filament

PHP
1
star