mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Fixed repeater with translation bug #8328
This commit is contained in:
+2
-2
@@ -91,10 +91,10 @@ trait Translatable
|
||||
|
||||
$this->otherLocaleData[$this->oldActiveLocale] = Arr::only($this->data, $translatableAttributes);
|
||||
|
||||
$this->data = [
|
||||
$this->form->fill([
|
||||
...Arr::except($this->data, $translatableAttributes),
|
||||
...$this->otherLocaleData[$this->activeLocale] ?? [],
|
||||
];
|
||||
]);
|
||||
|
||||
unset($this->otherLocaleData[$this->activeLocale]);
|
||||
}
|
||||
|
||||
+3
-2
@@ -29,10 +29,11 @@ trait Translatable
|
||||
$translatableAttributes = static::getResource()::getTranslatableAttributes();
|
||||
|
||||
$this->otherLocaleData[$this->oldActiveLocale] = Arr::only($this->data, $translatableAttributes);
|
||||
$this->data = [
|
||||
|
||||
$this->form->fill([
|
||||
...$this->data,
|
||||
...$this->otherLocaleData[$this->activeLocale] ?? [],
|
||||
];
|
||||
]);
|
||||
}
|
||||
|
||||
public function getTranslatableLocales(): array
|
||||
|
||||
Reference in New Issue
Block a user