From ea9660bb4ff7a2f8aa5117e51aa44aa893e40b64 Mon Sep 17 00:00:00 2001 From: Caleb Porzio Date: Mon, 5 Oct 2020 15:59:08 -0400 Subject: [PATCH] wip --- dist/manifest.json | 2 +- src/Response.php | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dist/manifest.json b/dist/manifest.json index dd8adb14f..a443224b1 100644 --- a/dist/manifest.json +++ b/dist/manifest.json @@ -1 +1 @@ -{"/livewire.js":"/livewire.js?id=d49d2eb95a76647bcd6b"} \ No newline at end of file +{"/livewire.js":"/livewire.js?id=273e2852331ec0ca16bf"} \ No newline at end of file diff --git a/src/Response.php b/src/Response.php index d078477ef..5d7743164 100644 --- a/src/Response.php +++ b/src/Response.php @@ -97,6 +97,13 @@ public function toSubsequentResponse() } } + // Make sure any data marked as "dirty" is present in the resulting data payload. + foreach (data_get($this, 'effects.dirty', []) as $property) { + $property = head(explode('.', $property)); + + data_set($dirtyMemo, 'data.'.$property, $responseMemo['data'][$property]); + } + return [ 'effects' => $this->effects, 'serverMemo' => $dirtyMemo,