diff --git a/packages/infolists/src/ComponentContainer.php b/packages/infolists/src/ComponentContainer.php index 8d451a8cbd..449cb094f4 100644 --- a/packages/infolists/src/ComponentContainer.php +++ b/packages/infolists/src/ComponentContainer.php @@ -46,11 +46,11 @@ class ComponentContainer extends ViewComponent { return match ($parameterName) { 'livewire' => [$this->getLivewire()], - 'record' => [$this->getRecord()], + 'record' => [$this->getRecord()], default => parent::resolveDefaultClosureDependencyForEvaluationByName($parameterName), }; } - + /** * @return array */ diff --git a/packages/infolists/src/Components/Component.php b/packages/infolists/src/Components/Component.php index 9d673f6198..f10641d36f 100644 --- a/packages/infolists/src/Components/Component.php +++ b/packages/infolists/src/Components/Component.php @@ -36,7 +36,7 @@ class Component extends ViewComponent protected function resolveDefaultClosureDependencyForEvaluationByName(string $parameterName): array { return match ($parameterName) { - 'livewire' => [$this->getLivewire()], + 'livewire' => [$this->getLivewire()], 'record' => [$this->getRecord()], 'state' => [$this->getState()], default => parent::resolveDefaultClosureDependencyForEvaluationByName($parameterName), diff --git a/tests/src/Infolists/Fixtures/Livewire.php b/tests/src/Infolists/Fixtures/Livewire.php index 093acef424..92e05d5a66 100644 --- a/tests/src/Infolists/Fixtures/Livewire.php +++ b/tests/src/Infolists/Fixtures/Livewire.php @@ -10,25 +10,25 @@ use Livewire\Component; class Livewire extends Component implements HasForms, HasInfolists { - use InteractsWithForms; - use InteractsWithInfolists; - - public $data; - - public static function make(): static - { - return new static; - } - - public function data($data): static - { - $this->data = $data; - - return $this; - } - - public function getData() - { - return $this->data; - } + use InteractsWithForms; + use InteractsWithInfolists; + + public $data; + + public static function make(): static + { + return new static; + } + + public function data($data): static + { + $this->data = $data; + + return $this; + } + + public function getData() + { + return $this->data; + } } diff --git a/tests/src/Infolists/LivewireTest.php b/tests/src/Infolists/LivewireTest.php index 857380d855..77c445830e 100644 --- a/tests/src/Infolists/LivewireTest.php +++ b/tests/src/Infolists/LivewireTest.php @@ -15,8 +15,8 @@ it('can inject the correct `$livewire` for infolists outside a panel', function ->assertSee('First Entry State') ->assertSee('Second Entry Label') ->assertSee('Second Entry State') - ->assertSee('Third Entry Label') - ->assertSee('Third Entry State (dynamic)'); + ->assertSee('Third Entry Label') + ->assertSee('Third Entry State (dynamic)'); }); class TestComponentWithInfolist extends Livewire @@ -55,11 +55,11 @@ class TestComponentWithInfolist extends Livewire ->label('Second Entry Label'), Infolists\Components\TextEntry::make('third_entry') ->label('Third Entry Label') - ->getStateUsing(function (TestComponentWithInfolist $livewire) { - expect($livewire)->toBe($this); - - return 'Third Entry State (dynamic)'; - }), + ->getStateUsing(function (TestComponentWithInfolist $livewire) { + expect($livewire)->toBe($this); + + return 'Third Entry State (dynamic)'; + }), ]; }); }