Skip to content

Commit

Permalink
Fixed issue with ItemFactory
Browse files Browse the repository at this point in the history
- added option is not being selected
- closes #1
  • Loading branch information
Danoha committed Nov 14, 2016
1 parent 359ad81 commit edf16fe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Components/AjaxSelect/Traits/ItemFactoryTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected abstract function handleInvalidValues($value);
/**
* TODO: cannot handle multiple values
* @param $values
* @return mixed
* @return array
*/
protected function processValues($values) {
if ($this->itemFactory === NULL) {
Expand Down Expand Up @@ -58,7 +58,11 @@ protected function processValues($values) {
}

$this->setItems($items);

if (!is_array($values)) {
$values = [ $values ];
}

return $values;
}
}
}

0 comments on commit edf16fe

Please sign in to comment.