@@ -149,7 +149,9 @@ public function withFields(Closure $callback): static
149149 $ field ->setModelAttribute ($ attribute )
150150 ->name ($ attribute )
151151 ->id ($ attribute )
152- ->value (fn (): mixed => $ tmpModel ->getAttribute ($ key ));
152+ ->when ($ tmpModel ->hasAttribute ($ key ), function (Field $ field ) use ($ tmpModel , $ key ): void {
153+ $ field ->value (fn (): mixed => $ tmpModel ->getAttribute ($ key ));
154+ });
153155 });
154156
155157 return $ fields ;
@@ -179,7 +181,7 @@ public function newTemporaryModel(array $attributes = []): Model
179181 };
180182
181183 return $ model ->forceFill (array_replace (
182- ['_key ' => Str::uuid ()],
184+ ['_key ' => Str::uuid ()-> toString () ],
183185 $ attributes
184186 ));
185187 }
@@ -217,10 +219,12 @@ public function resolveFormat(Request $request, Model $model): ?string
217219 {
218220 if (is_null ($ this ->formatResolver )) {
219221 $ this ->formatResolver = function (Request $ request , Model $ model , ?array $ value = null ): string {
220- $ values = array_map (fn (array $ value ): array => $ this ->resolveOptionFields ($ request , $ model , $ this ->newTemporaryModel ($ value ))
221- ->authorized ($ request , $ model )
222- ->visible ('show ' )
223- ->mapToDisplay ($ request , $ model ), (array ) $ value );
222+ $ values = array_map (function (array $ value ) use ($ request , $ model ): array {
223+ return $ this ->resolveOptionFields ($ request , $ model , $ this ->newTemporaryModel ($ value ))
224+ ->authorized ($ request , $ model )
225+ ->visible ('show ' )
226+ ->mapToDisplay ($ request , $ model );
227+ }, (array ) $ value );
224228
225229 return View::make ('root::fields.repeater-table ' , ['values ' => $ values ])->render ();
226230 };
0 commit comments