feat: Add RepeatableEntry table layout and TableColumn component (#17865)

* Add RepeatableEntry table layout and TableColumn component with tests

* chore: fix code style

* consistency with repeater

* Update EntriesDemo.php

---------

Co-authored-by: oddvalue <oddvalue@users.noreply.github.com>
Co-authored-by: Dan Harrin <git@danharrin.com>
This commit is contained in:
oddvalue
2025-09-25 10:03:43 +01:00
committed by GitHub
co-authored by oddvalue Dan Harrin
parent 73fd07ee07
commit 7c5cd978d7
19 changed files with 439 additions and 28 deletions
@@ -158,24 +158,22 @@
@endphp
@if ($schemaComponent->isVisible())
<td
@if (! (($schemaComponent instanceof Action) || ($schemaComponent instanceof ActionGroup)))
@php
$schemaComponentStatePath = $schemaComponent->getStatePath();
@endphp
@php
$schemaComponentStatePath = $schemaComponent->getStatePath();
@endphp
x-data="filamentSchemaComponent({
path: @js($schemaComponentStatePath),
containerPath: @js($itemStatePath),
isLive: @js($schemaComponent->isLive()),
$wire,
})"
@if ($afterStateUpdatedJs = $schemaComponent->getAfterStateUpdatedJs())
x-init="{{ implode(';', array_map(
fn (string $js): string => '$wire.watch(' . Js::from($schemaComponentStatePath) . ', ($state, $old) => ($state !== undefined) && eval(' . Js::from($js) . '))',
$afterStateUpdatedJs,
)) }}"
@endif
<td
x-data="filamentSchemaComponent({
path: @js($schemaComponentStatePath),
containerPath: @js($itemStatePath),
isLive: @js($schemaComponent->isLive()),
$wire,
})"
@if ($afterStateUpdatedJs = $schemaComponent->getAfterStateUpdatedJs())
x-init="{{ implode(';', array_map(
fn (string $js): string => '$wire.watch(' . Js::from($schemaComponentStatePath) . ', ($state, $old) => ($state !== undefined) && eval(' . Js::from($js) . '))',
$afterStateUpdatedJs,
)) }}"
@endif
>
{{ $schemaComponent }}