From 6aa004575fb89b563d90e333b4275b3c45184174 Mon Sep 17 00:00:00 2001 From: Patrick Date: Sat, 17 Aug 2024 18:38:45 +0200 Subject: [PATCH 1/3] Update InteractsWithForms.php --- packages/forms/src/Concerns/InteractsWithForms.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/forms/src/Concerns/InteractsWithForms.php b/packages/forms/src/Concerns/InteractsWithForms.php index f7c2ed7f7b7..2ba5eaed743 100644 --- a/packages/forms/src/Concerns/InteractsWithForms.php +++ b/packages/forms/src/Concerns/InteractsWithForms.php @@ -288,7 +288,9 @@ public function updatingInteractsWithForms(string $statePath): void { $statePath = (string) str($statePath)->before('.'); - $this->oldFormState[$statePath] = data_get($this, $statePath); + if (! Arr::has($this->oldFormState, 'data')) { + $this->oldFormState[$statePath] = data_get($this, $statePath); + } } public function getOldFormState(string $statePath): mixed From 8752a72a2ee55e301fe0be425fcc6ecf9e8c30f3 Mon Sep 17 00:00:00 2001 From: Patrick Date: Sun, 18 Aug 2024 16:50:31 +0200 Subject: [PATCH 2/3] Update InteractsWithForms.php --- packages/forms/src/Concerns/InteractsWithForms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/forms/src/Concerns/InteractsWithForms.php b/packages/forms/src/Concerns/InteractsWithForms.php index 2ba5eaed743..101c8d755e2 100644 --- a/packages/forms/src/Concerns/InteractsWithForms.php +++ b/packages/forms/src/Concerns/InteractsWithForms.php @@ -288,7 +288,7 @@ public function updatingInteractsWithForms(string $statePath): void { $statePath = (string) str($statePath)->before('.'); - if (! Arr::has($this->oldFormState, 'data')) { + if (! Arr::has($this->oldFormState, $statePath)) { $this->oldFormState[$statePath] = data_get($this, $statePath); } } From 0527f55ab565a5a240cf1d6a16b32fe67c641891 Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Wed, 23 Oct 2024 08:27:11 +0100 Subject: [PATCH 3/3] Update InteractsWithForms.php --- packages/forms/src/Concerns/InteractsWithForms.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/forms/src/Concerns/InteractsWithForms.php b/packages/forms/src/Concerns/InteractsWithForms.php index 101c8d755e2..a88b84b3fcf 100644 --- a/packages/forms/src/Concerns/InteractsWithForms.php +++ b/packages/forms/src/Concerns/InteractsWithForms.php @@ -288,9 +288,8 @@ public function updatingInteractsWithForms(string $statePath): void { $statePath = (string) str($statePath)->before('.'); - if (! Arr::has($this->oldFormState, $statePath)) { - $this->oldFormState[$statePath] = data_get($this, $statePath); - } + // https://github.com/filamentphp/filament/pull/13973 + $this->oldFormState[$statePath] ??= data_get($this, $statePath); } public function getOldFormState(string $statePath): mixed