Skip to content

Commit

Permalink
Fixed issue #10127: Fix bug with select2 options
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Dec 16, 2015
1 parent 1c447fc commit fbb1a1c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions application/extensions/SettingsWidget/SettingsWidget.php
Expand Up @@ -418,7 +418,7 @@ public function renderSelect($name, array $metaData, $form = null)
$htmlOptions = $this->htmlOptions($metaData,$form);
$select2Options=array_merge(
array(
'minimumResultsForSearch' => 1000,
'minimumResultsForSearch' => 8,
'dropdownAutoWidth'=> true,
'width' => "js: function(){ return Math.max.apply(null, $(this.element).find('option').map(function() { return $(this).text().length; }))+'em' }",
),(isset($metaData['selectOptions']) ? $metaData['selectOptions'] : array())
Expand All @@ -427,10 +427,7 @@ public function renderSelect($name, array $metaData, $form = null)
'data' => $metaData['options'],
'name' => $name,
'value' => $value,
//'options' => $select2Options,
'pluginOptions' => array(
'options' => $select2Options
),
'pluginOptions' => $select2Options,
'htmlOptions'=>$htmlOptions,
);
$properties['events']=isset($metaData['events']) ? $metaData['events'] : array();
Expand Down

0 comments on commit fbb1a1c

Please sign in to comment.