© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
Ric Le Poidevin

Liveware inputs not updating state

I’ve a custom form component that is not updating the Livewire state.

On load the data is correctly initialised and the fields populated. If I use the Alpine JS tools and update a value (green highlight) the input updates. If I update the input (yellow highlight) the state doesn’t update.

<div
    x-ignore
    ax-load
    ax-load-src="{{ \Filament\Support\Facades\FilamentAsset::getAlpineComponentSrc('braintree-payment') }}"
    x-data="braintreePayment({
        state: {
            clientToken: '{{ $clientToken }}',
            isLoaded: false,
            paymentAttempt: false,
            user: {
                givenName: '{{ $first_name }}',
                surname: '{{ $surname }}'
            }
        }
    })"
>
<div x-show="state.isLoaded && !state.paymentAttempt">
    <div>
        <x-filament-forms::field-wrapper class="rounded-lg" id="name" required="required" label="Name">
            <x-filament::input.wrapper>
                <x-filament::input
                    type="text"
                    x-bind:value="state.user.givenName"
                    required
                />
            </x-filament::input.wrapper>
        </x-filament-forms::field-wrapper>

        <x-filament-forms::field-wrapper class="rounded-lg" id="surname" required="required" label="Surname">
            <x-filament::input.wrapper>
                <x-filament::input
                    type="text"
                    x-bind:value="state.user.surname"
                    required
                />
            </x-filament::input.wrapper>
        </x-filament-forms::field-wrapper>
<div
    x-ignore
    ax-load
    ax-load-src="{{ \Filament\Support\Facades\FilamentAsset::getAlpineComponentSrc('braintree-payment') }}"
    x-data="braintreePayment({
        state: {
            clientToken: '{{ $clientToken }}',
            isLoaded: false,
            paymentAttempt: false,
            user: {
                givenName: '{{ $first_name }}',
                surname: '{{ $surname }}'
            }
        }
    })"
>
<div x-show="state.isLoaded && !state.paymentAttempt">
    <div>
        <x-filament-forms::field-wrapper class="rounded-lg" id="name" required="required" label="Name">
            <x-filament::input.wrapper>
                <x-filament::input
                    type="text"
                    x-bind:value="state.user.givenName"
                    required
                />
            </x-filament::input.wrapper>
        </x-filament-forms::field-wrapper>

        <x-filament-forms::field-wrapper class="rounded-lg" id="surname" required="required" label="Surname">
            <x-filament::input.wrapper>
                <x-filament::input
                    type="text"
                    x-bind:value="state.user.surname"
                    required
                />
            </x-filament::input.wrapper>
        </x-filament-forms::field-wrapper>


import dropIn from "braintree-web-drop-in";

export default function braintreePayment({
      state,
    }) {
    return {
        state,

        init: function () {
            console.log(this.state);
            this.state.isLoaded = true;
            ....
import dropIn from "braintree-web-drop-in";

export default function braintreePayment({
      state,
    }) {
    return {
        state,

        init: function () {
            console.log(this.state);
            this.state.isLoaded = true;
            ....
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

State not updating
FilamentFFilament / ❓┊help
2y ago
Viewfield not updating state
FilamentFFilament / ❓┊help
2y ago
filter inside liveware in v3 - how to get filter state?
FilamentFFilament / ❓┊help
3y ago
Updating state after filtering
FilamentFFilament / ❓┊help
3y ago