thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.78k stars 2.67k forks source link

Remove "None" default value on relationship select box #5210

Closed dmitrymaslov99 closed 3 years ago

dmitrymaslov99 commented 3 years ago

Version information

Laravel: v8.21.0 Voyager: v1.4 PHP: 7.4.11 Database: MySQL 5.7.26

Description

It is possible to remove the default value "None" on a select box when the relationship is required?

Steps To Reproduce

Steps to reproduce the behavior: Steps to reproduce the behavior: Add a relationship (BelongTo for instance) with the BREAD screen. In data creation screen, "None" is showing up in the dropdown list.

Expected behavior

Get "None" option not displayed.

Screenshots

image

Additional context

The problem has not been fixed for six months. Is there a temporary solution?

dmitrymaslov99 commented 3 years ago

Or can you at least swear if the person has not chosen anything?

MrCrayon commented 3 years ago

Duplicate of #5190

As explained in the other issue fix is available in 1.4.x-dev now that my PR has been merged.

1.4.3 will hopefully be released soon with the fix but I'm not sure about the timing.

dmitrymaslov99 commented 3 years ago

Thank you!

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.