Open MicaiasROliveira opened 1 year ago
Same issue.
Same issue for me, the label does not appear (and nothing in html inspector, it's not just hidden) :
// In Nova ressource
Number::make('Position')
->nullable(),
BelongsToManyField::make('Artistes participant :', 'artists', Artist::class)
->optionsLabel('title')
->hideFromIndex(),
BelongsToManyField::make('Styles :', 'styles', Style::class)
->optionsLabel('title')
->hideFromIndex(),
render like this :
I have some problem Nova 4.32.6
Same issue Nova 4.32.11 has anyone found a solution ? i read the entier code but found nothing that could be the reason why :/
same problem
Solved... change in BelongsToManyField.php this code:
to
then it works:
Now is not necessary to use optionLabel call. Field gets name from make atribute parameter.
public function jsonSerialize(): array
{
return array_merge(parent::jsonSerialize(),['withLabel' => $this->withLabel]);
}
Thanks
When creating and updating, there is a problem rendering the field name, for example when I do:
BelongsToManyField::make('Roles', 'roles', Role::class),
The name Roles does not appear and the multiselect is at the beginning where the name should be. I fixed this by downgrading to nova 4.25.*