Skip to content

Commit a000628

Browse files
committed
[LiveComponent] add LiveProp name to modifier function
1 parent ab44abf commit a000628

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LiveComponent/src/Metadata/LivePropMetadata.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public function withModifier(object $component): self
135135
throw new \LogicException(\sprintf('Method "%s::%s()" given in LiveProp "modifier" does not exist.', $component::class, $modifier));
136136
}
137137

138-
$modifiedLiveProp = $component->{$modifier}($this->liveProp);
138+
$modifiedLiveProp = $component->{$modifier}($this->liveProp, $this->getName());
139139
if (!$modifiedLiveProp instanceof LiveProp) {
140140
throw new \LogicException(\sprintf('Method "%s::%s()" should return an instance of "%s" (given: "%s").', $component::class, $modifier, LiveProp::class, get_debug_type($modifiedLiveProp)));
141141
}

0 commit comments

Comments
 (0)