FilamentF
Filament13mo ago
Matthew

How to "rerender" custom elememts in blade using alpinejs

I will try to explain this the best I can. Assume I have this blade file:
<x-filament-panels::page>
    <x-filament::section>
        <div
            class="grid grid-flow-col justify-stretch gap-4"
            x-data="{ message: '' }"
        >
            <div
                x-model="message"
                x-ignore
                ax-load
                ax-load-src="{{ ... }}"
                x-data="codeEditor()"
            >
            </div>
            <customEl x-ref="container" x-text="message"></customEl>
        </div>
    </x-filament::section>
</x-filament-panels::page>

Everytime message is changed, I want to rerender customEl. Due to the nature of that component, just having x-text isnt enough. As I said it needs to be rerendered, but Im not sure how I can approach this. Any ideas?
Was this page helpful?