F
Filament15mo ago
Mdk

Preload a relationship select if a parent select has a value

I'm currently creating a form where the user can pick an item, either by starting from the very first category and filtering it down or just searching in the entire catalogue Each select is searchable, and results are filtered according to the previous one (if something is selected), but for added user-friendlyness I'd like to also show the first 50 or so items in child selects if they're already filtered down I tried using ->preload(fn($get) => $get('category_id')) on a child select with and without ->live() but neither had any impact
1 Reply
Mdk
MdkOP15mo ago
Update: that code works as planned IF I'm editing something that already has a category selected, it doesn't when I'm creating a new entity
Want results from more Discord servers?
Add your server