© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•15mo ago•
4 replies
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>
<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>
Solution
I resolved my issue. We can refer ❓┊helpCustom Field passing dynamic data challenge
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Re-rendering Livewire inside Custom Form Field
FilamentFFilament / ❓┊help
10mo ago
Custom form field and Custom Livewire component
FilamentFFilament / ❓┊help
2y ago
Custom Field disappear after LiveWire update
FilamentFFilament / ❓┊help
2y ago
Creating custom livewire action Componente using relationships
FilamentFFilament / ❓┊help
3y ago