-
Notifications
You must be signed in to change notification settings - Fork 917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.1][Bug] Relationship with InlineCreate allows_null not working due to missing empty option placeholder #2760
Comments
Hello there! Thanks for opening your first issue on this repo! Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that. Backpack communication channels:
Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch. Thank you! -- |
@warton Thank you very much for spotting and providing a solution. I'v just submited PR: #2765 As soon as it gets merged a Also note that
and Going to close this, any further addressing should be done in the PR thread. Thanks again @warton |
cool, thx :) |
Merged! A |
Yes, it works as expected. Thank you guys, you're the best! :) |
Bug report
What I did
I set my
relationship
field to allowinline_create
and'allows_null' => true
What I expected to happen
When my
relationship
field is set, I cannot unset it as the underlyingselect
is missing empty option as required https://select2.org/placeholders:What happened
My set value remained populated and didn't unset.
What I've already tried to fix it
The fix is easy for me. I've added to blade:
crud/fields/relationship/fetch_or_create.blade.php:115
I didn't try
fetch.blade.php
, but I suppose it's the same issue there.Backpack, Laravel, PHP, DB version
When I run
php artisan backpack:version
the output is:PHP VERSION:
PHP 7.4.4 (cli) (built: Mar 17 2020 13:49:19) ( ZTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Xdebug v2.8.1, Copyright (c) 2002-2019, by Derick Rethans
LARAVEL VERSION:
v7.9.2@757b155658ae6da429065ba8f22242fe599824f7
BACKPACK VERSION:
4.1.x-dev@71cff08a82f925f014e815d2daa9190b6f2e5f5f
The text was updated successfully, but these errors were encountered: