2121use Illuminate \Support \Collection ;
2222use Illuminate \Support \Str ;
2323use Saade \FilamentAdjacencyList \Forms \Components \AdjacencyList ;
24- use Backstage \Fields \Base ;
2524
2625class Repeater extends Base implements FieldContract
2726{
@@ -112,15 +111,15 @@ public function getForm(): array
112111 Forms \Components \Toggle::make ('config.reorderableWithButtons ' )
113112 ->label (__ ('Reorderable with buttons ' ))
114113 ->dehydrated ()
115- ->disabled (fn (Forms \Get $ get ): bool => $ get ('config.reorderable ' ) === false )
114+ ->disabled (fn (Forms \Get $ get ): bool => $ get ('config.reorderable ' ) === false )
116115 ->inline (false ),
117116 ]),
118117 Forms \Components \Toggle::make ('config.collapsible ' )
119118 ->label (__ ('Collapsible ' ))
120119 ->inline (false ),
121120 Forms \Components \Toggle::make ('config.collapsed ' )
122121 ->label (__ ('Collapsed ' ))
123- ->visible (fn (Forms \Get $ get ): bool => $ get ('config.collapsible ' ) === true )
122+ ->visible (fn (Forms \Get $ get ): bool => $ get ('config.collapsible ' ) === true )
124123 ->inline (false ),
125124 Forms \Components \Toggle::make ('config.cloneable ' )
126125 ->label (__ ('Cloneable ' ))
@@ -139,9 +138,9 @@ public function getForm(): array
139138 ->live (debounce: 250 )
140139 ->labelKey ('name ' )
141140 ->maxDepth (0 )
142- ->addable (fn (string $ operation ) => $ operation !== 'create ' )
143- ->disabled (fn (string $ operation ) => $ operation === 'create ' )
144- ->hint (fn (string $ operation ) => $ operation === 'create ' ? __ ('Fields can be added once the field is created. ' ) : '' )
141+ ->addable (fn (string $ operation ) => $ operation !== 'create ' )
142+ ->disabled (fn (string $ operation ) => $ operation === 'create ' )
143+ ->hint (fn (string $ operation ) => $ operation === 'create ' ? __ ('Fields can be added once the field is created. ' ) : '' )
145144 ->hintColor ('primary ' )
146145 ->form ([
147146 Section::make ('Field ' )
@@ -156,7 +155,7 @@ public function getForm(): array
156155 ->required ()
157156 ->placeholder (__ ('Name ' ))
158157 ->live (debounce: 250 )
159- ->afterStateUpdated (fn (Set $ set , ?string $ state ) => $ set ('slug ' , Str::slug ($ state ))),
158+ ->afterStateUpdated (fn (Set $ set , ?string $ state ) => $ set ('slug ' , Str::slug ($ state ))),
160159 TextInput::make ('slug ' )
161160 ->readonly (),
162161 Select::make ('field_type ' )
@@ -186,10 +185,10 @@ function () {
186185 ])->columnSpanFull (),
187186 Section::make ('Configuration ' )
188187 ->columns (3 )
189- ->schema (fn (Get $ get ) => $ this ->getFieldTypeFormSchema (
188+ ->schema (fn (Get $ get ) => $ this ->getFieldTypeFormSchema (
190189 $ get ('field_type ' )
191190 ))
192- ->visible (fn (Get $ get ) => filled ($ get ('field_type ' ))),
191+ ->visible (fn (Get $ get ) => filled ($ get ('field_type ' ))),
193192 ]),
194193 ])->columns (2 ),
195194 ])->columnSpanFull (),
0 commit comments