Closure on select options strange behavior

Hello, I don't know how to explain it properly but I have an header table action in my RelationManager. Inside I have a form with a select. If in the options of the select I pass an array :
->options([4 => 'Test'])
->options([4 => 'Test'])
Or
->options(Product::where(...)->toArray())
->options(Product::where(...)->toArray())
Then I submit the form, it saves and refresh the table. BUT If I pass a closure to the options field, like :
->options(fn(Get $get) => Product::where(...))
->options(fn(Get $get) => Product::where(...))
Even without change my query, the table won't refresh. Any idea ?
1 Reply
arnaudsf
arnaudsfOP3w ago
Ok I found that it's an incompatibility with Choice.js and options with a closure

Did you find this page helpful?