From: Vincent Vanwaelscappel Date: Wed, 6 Sep 2023 13:21:59 +0000 (+0200) Subject: wip #6248 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=d0ca4d4a7c8988945476a844bfa734abdab4c1c6;p=cubist_cms-back.git wip #6248 @0.25 --- diff --git a/src/resources/views/fields/select2_from_array.blade.php b/src/resources/views/fields/select2_from_array.blade.php index 16b1166..80afbdd 100644 --- a/src/resources/views/fields/select2_from_array.blade.php +++ b/src/resources/views/fields/select2_from_array.blade.php @@ -7,12 +7,10 @@ if(null===$o || $o==='null'){ return false; } - if(!is_array($o)){ + if(is_scalar($o)){ return $o==$key; - }else { - return in_array($key,$o); } - return false; + return in_array($key,$o); } } @@ -24,20 +22,21 @@ if($ajax){ } @endphp - + @include('crud::fields.inc.wrapper_start') @if (isset($field['allows_multiple']) && $field['allows_multiple']==true) @endif