© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
2 replies
Vazaios

Custom Livewire component that sets a new item to the repeater component inside the resource's form

I have an OrderResource form. Inside that form I use the Repeater component to handle the orderlines entries for the Order Model. Each Orderline item inside the Repeater has a SELECT Input for product_id, quantity, overwrite prices inputs etc.
I have made another custom component called Scanner that uses a scanner library for qrcodes. I have made all the logic to find a product and now I am stuck on how to interacts with the form's state and specifically with the repeaters state to set a new entry

class Scanner extends Component
{
public bool $scannerOpen = false;

#[On('scanQRCode')]
public function addQRProduct($qrcode)
{
$product = Product::where('qrcode', $qrcode)->first();
if ($product) {
Notification::make()
->title('Βρέθηκε το ' . __('Product.label') . ' ' . $qrcode)
->success()
->send();

$newOrderline = [
// product_id
// quantity
// tax_amount
// ....
];

// Update repeaters state...
}
}
}
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

How customize Repeater's item using Livewire component?
FilamentFFilament / ❓┊help
16mo ago
Custom Livewire component in a repeater
FilamentFFilament / ❓┊help
15mo ago
Filament Action inside a custom Livewire component
FilamentFFilament / ❓┊help
2y ago
Access Livewire component data inside Resource form
FilamentFFilament / ❓┊help
15mo ago