© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•4mo ago•
2 replies
Ferdmusic

Livewire Component in Custom Field Shares State within a Repeater

Just for context: I am using a simplified scenario here as I can not share the actual code.

What I am trying to do:

I am trying to use a Livewire component that is rendered via a custom Filament Field inside a Repeater. Each instance of the Livewire component should manage its own state independently. For context, I am relatively new to the TALL stack.

What I did:

1. I set up a Filament
Repeater
Repeater
to allow adding multiple blocks.
2. Inside the repeater's schema, I have a custom Filament
Field
Field
class called
DataGrid
DataGrid
.
3. The
DataGrid
DataGrid
field's view renders a Livewire component,
DataGridComponent
DataGridComponent
.
4. The Livewire component's state is bound to the Filament field's state via
wire:model
wire:model
.

My issue/the error:

When I add a second item to the Repeater, the new instance of the
DataGridComponent
DataGridComponent
shares its state with the first instance. Modifying the data in one component (e.g., adding a row) concurrently modifies the data in the other.

The root cause appears to be that a non-unique
:key
:key
is being passed to the Livewire components. My current implementation uses
:key="$this->getID()"
:key="$this->getID()"
within the custom field's view, but
$this->getID()
$this->getID()
returns an identical value for every item in the repeater.

My Question:

What is the correct method to supply a unique
key
key
to a Livewire component that is rendered by a custom field's view for each item within a Filament Repeater?
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

Custom Livewire component in a repeater
FilamentFFilament / ❓┊help
15mo ago
Issue in using custom component within Repeater
FilamentFFilament / ❓┊help
2y ago
Custom form field and Custom Livewire component
FilamentFFilament / ❓┊help
2y ago
An issue in calling a Livewire component inside custom field
FilamentFFilament / ❓┊help
2y ago