1 parent
c0dc174809
commit
4aae8fb438
1 file changed
+3
@@ -739,6 +739,8 @@ class FormBuilder
|
|||||||
{
|
{
|
||||||
if (is_array($selected)) {
|
if (is_array($selected)) {
|
||||||
return in_array($value, $selected) ? 'selected' : null;
|
return in_array($value, $selected) ? 'selected' : null;
|
||||||
|
} elseif ($selected instanceof Collection) {
|
||||||
|
return $selected->contains($value) ? 'selected' : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ((string) $value == (string) $selected) ? 'selected' : null;
|
return ((string) $value == (string) $selected) ? 'selected' : null;
|
||||||
@@ -1128,6 +1130,7 @@ class FormBuilder
|
|||||||
|
|
||||||
if ($hasNullMiddleware
|
if ($hasNullMiddleware
|
||||||
&& is_null($old)
|
&& is_null($old)
|
||||||
|
&& is_null($value)
|
||||||
&& !is_null($this->view->shared('errors'))
|
&& !is_null($this->view->shared('errors'))
|
||||||
&& count($this->view->shared('errors')) > 0
|
&& count($this->view->shared('errors')) > 0
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in new issue
Block a user