We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2262235 commit 120eebdCopy full SHA for 120eebd
src/Response.php
@@ -48,11 +48,15 @@ public function withViewData($key, $value = null)
48
49
public function toResponse($request)
50
{
51
- $only = array_filter(explode(',', $request->header('X-Inertia-Only')));
+ $only = array_filter(explode(',', $request->header('X-Inertia-Partial-Data')));
52
+
53
+ $props = ($only && $request->header('X-Inertia-Partial-Component') === $this->component)
54
+ ? array_only($this->props, $only)
55
+ : $this->props;
56
57
$props = array_map(function ($prop) {
58
return $prop instanceof Closure ? App::call($prop) : $prop;
- }, $only ? array_only($this->props, $only) : $this->props);
59
+ }, $props);
60
61
$page = [
62
'component' => $this->component,
0 commit comments