How can I access component properties in view?
I'm trying to create a custom field using the following code:
Now I want to use the
$selectedItem
property in my blade (wire:model
):
But I get this error:
Livewire: [wire:model="selectedItem"] property does not exist on component: [app.domains.relations.filament.resources.relation-resrouce.relation-managers.packages-relation-manager]
What am I doing wrong? It seems the view is looking at the parent component or something?2 Replies
I guess the field itself isn't a Livewire component.
The main issue is that
wire:model='selectedItem'
is looking for a property on the Livewire component, but selectedItem
exists in your Filament field class, which Livewire doesn't recognize.
If you want, I can give you more detailed soulution