jqh 5 vuotta sitten
vanhempi
commit
1f07dc7922
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      src/Form/Field/SelectResource.php

+ 2 - 1
src/Form/Field/SelectResource.php

@@ -172,6 +172,7 @@ class SelectResource extends Field
         $selectedOptionsLabel = trans('admin.selected_options');
         $selectedOptionsLabel = trans('admin.selected_options');
         $disabled = empty($this->attributes['disabled']) ? '' : 'disabled';
         $disabled = empty($this->attributes['disabled']) ? '' : 'disabled';
         $containerId = $this->id.$this->formElementId();
         $containerId = $this->id.$this->formElementId();
+        $maxItem = (int) $this->maxItem;
 
 
         Admin::script(
         Admin::script(
             <<<JS
             <<<JS
@@ -180,7 +181,7 @@ LA.ResourceSelector({
     column: "{$this->elementName()}",
     column: "{$this->elementName()}",
     source: '{$this->source}',
     source: '{$this->source}',
     selector: '#{$this->btnId}',
     selector: '#{$this->btnId}',
-    maxItem: {$this->maxItem}, 
+    maxItem: {$maxItem}, 
     area: {$area},
     area: {$area},
     items: {$this->value()},
     items: {$this->value()},
     placeholder: '{$this->placeholder()}',
     placeholder: '{$this->placeholder()}',