Custom Livewire component
Last updated
Was this helpful?
Last updated
Was this helpful?
Please read the page. It is recommended that you create a Custom Field
instead of using this method because Livewire doesn't handle nested components very well.
livewireComponent(string $component, array $params = [])
Replace the field with your own Livewire component.
$component
= String, the path and name (as path.name
) to a Livewire component
$params
= Optional array with parameters to pass to the child component.
custom()
or emitUp()
In this example we are using the custom()
method to tell the component that we want to handle this field manually. (). Another option could be to do emitUp()
() in the child component to populate the field in the main form component.
The example is for a fictive Livewire/App/Tags
component with three properties.