F
Filament12mo ago
NikkiP

Populating Repeater Select Dropdown

How can you populate a select dropdown inside a repeater based on the select dropdown outside the repeater. See attached screenshot. Thank you!
No description
Solution:
Passing an array into the repeater.. ```php ->live() ->afterStateUpdated(function($state, \Closure $get) { $set('myRepeater', SubjectsModel::find((int) $state)->toArray());...
Jump to solution
2 Replies
Solution
toeknee
toeknee12mo ago
Passing an array into the repeater..
->live()
->afterStateUpdated(function($state, \Closure $get) {
$set('myRepeater', SubjectsModel::find((int) $state)->toArray());
}
->live()
->afterStateUpdated(function($state, \Closure $get) {
$set('myRepeater', SubjectsModel::find((int) $state)->toArray());
}
should work, or your can do a built of an array from populating it and then settingn it as but the $set above
NikkiP
NikkiPOP12mo ago
thank you for the help! Much appreciated.
Want results from more Discord servers?
Add your server