© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
17 replies
Oliverdam

Triggering state change

I'm trying to create a custom component that's a block editor, using the Laraberg library (https://github.com/VanOns/laraberg). The laraberg editor gets initialized from a textfield, this textfields value is then updated on submit. The value does get updated, but it doesn't seem to update the state, meaning null gets sent to the backend.

This is the code for the component I have right now.
<x-dynamic-component
    :component="$getFieldWrapperView()"
    :field="$field"
>
    <div x-data="{ state: $wire.$entangle('{{ $getStatePath() }}') }"
        x-cloak
        wire:ignore
        x-init="$nextTick(() => {
            Laraberg.init('laraberg-input', { laravelFilemanager: true, height: '800px' });
        })"
    >
        <textarea id="laraberg-input" name="laraberg-body"x-model="state"></textarea>
    </div>
</x-dynamic-component>
<x-dynamic-component
    :component="$getFieldWrapperView()"
    :field="$field"
>
    <div x-data="{ state: $wire.$entangle('{{ $getStatePath() }}') }"
        x-cloak
        wire:ignore
        x-init="$nextTick(() => {
            Laraberg.init('laraberg-input', { laravelFilemanager: true, height: '800px' });
        })"
    >
        <textarea id="laraberg-input" name="laraberg-body"x-model="state"></textarea>
    </div>
</x-dynamic-component>
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

Change State
FilamentFFilament / ❓┊help
15mo ago
SelectAction state change action
FilamentFFilament / ❓┊help
3y ago
Change state before dehydration
FilamentFFilament / ❓┊help
3y ago
Disabling action realtime on state change
FilamentFFilament / ❓┊help
17mo ago