© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago
Daniel

Access to repeater item from inside

In a repeater I do have a button inside each item (which should open a modal containing a list of models) and I want the button to get the current index of each row. How can I access the item from the button (which is a Livewire component)?

I want to pass the current index (of each button) to the modal like this:

<button type="button" wire:click="$emit('openModal', 'app.livewire.list-recent-persons', {{ json_encode(['currentIndex' => $currentIndex]) }})">
    Open modal
</button>
<button type="button" wire:click="$emit('openModal', 'app.livewire.list-recent-persons', {{ json_encode(['currentIndex' => $currentIndex]) }})">
    Open modal
</button>
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

Access repeater item value from outside
FilamentFFilament / ❓┊help
2y ago
How to access $state inside a Repeater item ->collapsed()
FilamentFFilament / ❓┊help
16mo ago
Repeater item index access?
FilamentFFilament / ❓┊help
2y ago
How to access the Repeater item?
FilamentFFilament / ❓┊help
3y ago