Phase 0: Fundament für Inhaus
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m14s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 1m12s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m7s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m19s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m32s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m22s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 1m32s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m35s
CI / Build-Artefakte aktuell (pull_request) Failing after 1m7s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m14s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 1m12s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m7s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m19s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m32s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m22s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 1m32s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m35s
CI / Build-Artefakte aktuell (pull_request) Failing after 1m7s
- Laravel 13 mit Filament 5 (Admin), Inertia 3 + Vue 3 + Vuetify 4 (Material 3) - Anmeldung über Fortify (Login, Passwort vergessen/ändern), keine Selbstregistrierung - Profil mit Profilbild (WebP in festen Größen), Personenseiten, Header mit Avatar-Menü - Material-3-Farbschema aus der Primärfarbe, hell/dunkel/System pro Person - Basis-Branding (Portalname, Logo, Primärfarbe) im Admin unter „Erscheinungsbild“ - Benutzerverwaltung im Admin, Zugang vorläufig über is_admin - vendor/ (ohne Dev-Pakete) und Frontend-Build mitversioniert, Dev-Pakete in vendor-dev/ - PHPUnit-Tests gegen MySQL/MariaDB, Forgejo-CI-Matrix, Docker-Entwicklungsumgebung - VERSION, CHANGELOG.md und CONTRIBUTING.md mit Release-Ablauf Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7197eaebf2
commit
9c0f8de791
15771 changed files with 1564103 additions and 5 deletions
147
vendor/filament/infolists/docs/08-repeatable-entry.md
vendored
Normal file
147
vendor/filament/infolists/docs/08-repeatable-entry.md
vendored
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
---
|
||||
title: Repeatable entry
|
||||
---
|
||||
import AutoScreenshot from "@components/AutoScreenshot.astro"
|
||||
import UtilityInjection from "@components/UtilityInjection.astro"
|
||||
|
||||
## Introduction
|
||||
|
||||
The repeatable entry allows you to repeat a set of entries and layout components for items in an array or relationship.
|
||||
|
||||
```php
|
||||
use Filament\Infolists\Components\RepeatableEntry;
|
||||
use Filament\Infolists\Components\TextEntry;
|
||||
|
||||
RepeatableEntry::make('comments')
|
||||
->schema([
|
||||
TextEntry::make('author.name'),
|
||||
TextEntry::make('title'),
|
||||
TextEntry::make('content')
|
||||
->columnSpan(2),
|
||||
])
|
||||
->columns(2)
|
||||
```
|
||||
|
||||
As you can see, the repeatable entry has an embedded `schema()` which gets repeated for each item.
|
||||
|
||||
For example, the state of this entry might be represented as:
|
||||
|
||||
```php
|
||||
[
|
||||
[
|
||||
'author' => ['name' => 'Jane Doe'],
|
||||
'title' => 'Wow!',
|
||||
'content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam euismod, nisl eget aliquam ultricies, nunc nisl aliquet nunc, quis aliquam nisl.',
|
||||
],
|
||||
[
|
||||
'author' => ['name' => 'John Doe'],
|
||||
'title' => 'This isn\'t working. Help!',
|
||||
'content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam euismod, nisl eget aliquam ultricies, nunc nisl aliquet nunc, quis aliquam nisl.',
|
||||
],
|
||||
]
|
||||
```
|
||||
|
||||
<AutoScreenshot name="infolists/entries/repeatable/simple" alt="Repeatable entry" version="5.x" />
|
||||
|
||||
Alternatively, `comments` and `author` could be Eloquent relationships, `title` and `content` could be attributes on the comment model, and `name` could be an attribute on the author model. Filament will automatically handle the relationship loading and display the data in the same way.
|
||||
|
||||
## Grid layout
|
||||
|
||||
You may organize repeatable items into columns by using the `grid()` method:
|
||||
|
||||
```php
|
||||
use Filament\Infolists\Components\RepeatableEntry;
|
||||
|
||||
RepeatableEntry::make('comments')
|
||||
->schema([
|
||||
// ...
|
||||
])
|
||||
->grid(2)
|
||||
```
|
||||
|
||||
This method accepts the same options as the `columns()` method of the [grid](../schemas/layouts#grid-system). This allows you to responsively customize the number of grid columns at various breakpoints.
|
||||
|
||||
<UtilityInjection set="infolistEntries" version="5.x">As well as allowing a static value, the `grid()` method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.</UtilityInjection>
|
||||
|
||||
<AutoScreenshot name="infolists/entries/repeatable/grid" alt="Repeatable entry in grid layout" version="5.x" />
|
||||
|
||||
## Removing the styled container
|
||||
|
||||
By default, each item in a repeatable entry is wrapped in a container styled as a card. You may remove the styled container using `contained()`:
|
||||
|
||||
```php
|
||||
use Filament\Infolists\Components\RepeatableEntry;
|
||||
|
||||
RepeatableEntry::make('comments')
|
||||
->schema([
|
||||
// ...
|
||||
])
|
||||
->contained(false)
|
||||
```
|
||||
|
||||
<UtilityInjection set="infolistEntries" version="5.x">As well as allowing a static value, the `contained()` method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.</UtilityInjection>
|
||||
|
||||
<AutoScreenshot name="infolists/entries/repeatable/contained-false" alt="Repeatable entry without styled container" version="5.x" />
|
||||
|
||||
## Table repeatable layout
|
||||
|
||||
You can present repeatable items in a table format using the `table()` method, which accepts an array of `TableColumn` objects. These objects represent the columns of the table, which correspond to any components in the schema of the entry:
|
||||
|
||||
```php
|
||||
use Filament\Infolists\Components\IconEntry;
|
||||
use Filament\Infolists\Components\RepeatableEntry;
|
||||
use Filament\Infolists\Components\RepeatableEntry\TableColumn;
|
||||
use Filament\Infolists\Components\TextEntry;
|
||||
|
||||
RepeatableEntry::make('comments')
|
||||
->table([
|
||||
TableColumn::make('Author'),
|
||||
TableColumn::make('Title'),
|
||||
TableColumn::make('Published'),
|
||||
])
|
||||
->schema([
|
||||
TextEntry::make('author.name'),
|
||||
TextEntry::make('title'),
|
||||
IconEntry::make('is_published')
|
||||
->boolean(),
|
||||
])
|
||||
```
|
||||
|
||||
<AutoScreenshot name="infolists/entries/repeatable/table" alt="Repeatable entry with table layout" version="5.x" />
|
||||
|
||||
The labels displayed in the header of the table are passed to the `TableColumn::make()` method. If you want to provide an accessible label for a column but do not wish to display it, you can use the `hiddenHeaderLabel()` method:
|
||||
|
||||
```php
|
||||
use Filament\Infolists\Components\RepeatableEntry\TableColumn;
|
||||
|
||||
TableColumn::make('Name')
|
||||
->hiddenHeaderLabel()
|
||||
```
|
||||
|
||||
You can enable wrapping of the column header using the `wrapHeader()` method:
|
||||
|
||||
```php
|
||||
use Filament\Infolists\Components\RepeatableEntry\TableColumn;
|
||||
|
||||
TableColumn::make('Name')
|
||||
->wrapHeader()
|
||||
```
|
||||
|
||||
You can also adjust the alignment of the column header using the `alignment()` method, passing an `Alignment` option of `Alignment::Start`, `Alignment::Center`, or `Alignment::End`:
|
||||
|
||||
```php
|
||||
use Filament\Infolists\Components\RepeatableEntry\TableColumn;
|
||||
use Filament\Support\Enums\Alignment;
|
||||
|
||||
TableColumn::make('Name')
|
||||
->alignment(Alignment::Center)
|
||||
```
|
||||
|
||||
You can set a fixed column width using the `width()` method, passing a string value that represents the width of the column. This value is passed directly to the `style` attribute of the column header:
|
||||
|
||||
```php
|
||||
use Filament\Infolists\Components\RepeatableEntry\TableColumn;
|
||||
|
||||
TableColumn::make('Name')
|
||||
->width('200px')
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue