FilamentF
Filament13mo ago
Pritbor

Problem creating Custom Field rendering Livewire

I would like to share the data between custom field livewire and rendered child livewire. I get error Object of class Closure could not be converted to string. Below is my custom field view file . In my child livewire i am using #[Modelable] as per livewire 3 documentation.
<x-dynamic-component
    :component="$getFieldWrapperView()"
    :field="$field"
>


<div >

    <button type="button" @click="$dispatch('open-modal', { id: 'business-category-select-modal' })">
        Select Business Categories
    </button>


    <x-filament::modal id="business-category-select-modal">
        <x-slot name="heading">
            Modal heading
        </x-slot>

        <livewire:business-category-selection :modelId="$modelId"  modelType="Brand"  :key="'business-category-select-' . $modelId"   wire:model="{{ $getStatePath() }}"  />
    </x-filament::modal>

</div>


</x-dynamic-component>
Was this page helpful?