Translatable plugin doesn't support relationship selects
I'm trying to implement a dynamic form where I have select with relationship which has translatable title. However, there is no way to pass the name except passing labels like this:
So I made some changes in the select component near where options are formed by using function above:
Is there a better way to get this supported by default from plugin or by the filament form builder itself? Because from my point of view now I'm locked with current version of the Select component, because this hook is in the middle of the big callbacks hell, which forces me to reuse quite a lot of code which I don't need.
3 Replies
I have the same issue, all select in forms and filters and maybe others too
getting the same issue
I think it's a bug
for now you can do
->options(Model::pluck('name', 'id'))
better way:
->getOptionLabelFromRecordUsing(fn (Category $record) => "{$record->name}")
yeah, that's the way I'm doing as well, however would be super nice to get support out of the box with the plugin π
Hello, i got the same problem and the workaround works well . Looks like a bug because it works natively in v2 :/