@teleport directive creates component not found error #6750
Replies: 3 comments 7 replies
-
|
I have encountered a similar issue. When using Livewire as full page component, and you have teleport in it. After calling a method or triggering a rerender, anything that was teleported to the body is gone. In my case it was a contextmenu and couple of modals. |
Beta Was this translation helpful? Give feedback.
-
|
As mentioned in the other discussion, I'm not sure if this is a bug as mentioned in the documentation:
A full page-component, is a Livewire component, so technically you are not teleporting HTML outside your component. <div wire:ignore>
@teleport('body')
<div x-show="open">
Modal contents...
</div>
@endteleport
</div> |
Beta Was this translation helpful? Give feedback.
-
|
I tried to replicate the issue but was not able to do so: Another simplified example: Parent component: class ParentComponent extends Component
{
public $title = '';
public function render()
{
return <<<'BLADE'
<div>
<input type="text" wire:model.live="title" />
@teleport('body')
<livewire:child-component/>
@endteleport
</div>
BLADE;
}
}Child component class ChildComponent extends Component
{
public $title = '';
public function render()
{
return <<<'BLADE'
<div>
<input type="text" wire:model.live="title" />
</div>
BLADE;
}
}When I start typing in either the parent or child component I don't get an error and the contents of the teleport remains. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Livewire version
3.0.2
Which PHP version are you using?
PHP 8.2
Repository URL
No response
Steps To Reproduce
The bug is:
When using livewire full page component, any livewire component inside @teleport directive causing..

Teleporting a livewire component creating this issue. Any dynamic interaction of teleporting component such as changing forms modelValue, submitting forms, disptaching or listening events etc. creates 'component not found' error. Anyone can easily reproduce this issue by:
It should be fixed as soon as possible.
Additional information
No response
Please confirm (incomplete submissions will not be addressed)
Beta Was this translation helpful? Give feedback.
All reactions