Skip to content

Commit 8c82d52

Browse files
committed
repeater improvements
1 parent 5c3fdae commit 8c82d52

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/Fields/Repeater.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,11 @@ public function getForm(): array
156156
->visible(fn (Get $get): bool => $get('config.collapsible') === true),
157157
Forms\Components\Toggle::make('config.cloneable')
158158
->label(__('Cloneable')),
159-
]),
159+
])->columnSpanFull(),
160160
Grid::make(2)->schema([
161161
TextInput::make('config.addActionLabel')
162-
->label(__('Add action label')),
162+
->label(__('Add action label'))
163+
->columnSpan(fn (Get $get) => ($get('config.tableMode') ?? false) ? 'full' : 1),
163164
TextInput::make('config.columns')
164165
->label(__('Columns'))
165166
->default(1)
@@ -172,7 +173,7 @@ public function getForm(): array
172173
->label(__('Compact table'))
173174
->live()
174175
->visible(fn (Get $get): bool => ($get('config.tableMode') ?? false)),
175-
]),
176+
])->columnSpanFull(),
176177
AdjacencyList::make('config.form')
177178
->columnSpanFull()
178179
->label(__('Fields'))
@@ -246,11 +247,6 @@ function () {
246247
))
247248
->visible(fn (Get $get) => filled($get('field_type'))),
248249
]),
249-
InfoSection::make(__('Table Mode Information'))
250-
->description(__('When table mode is enabled, the repeater will display its fields in a table format. The table columns will be automatically generated from the child fields.'))
251-
->visible(fn (Get $get): bool => $get('config.tableMode') === true)
252-
->columnSpanFull()
253-
->schema([]),
254250
])->columns(2),
255251
])->columnSpanFull(),
256252
];

0 commit comments

Comments
 (0)