[core] fix two-levels list default value support
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
e74f526c19
commit
fb05976fa6
1 changed files with 5 additions and 1 deletions
|
@ -319,7 +319,11 @@ abstract class BridgeAbstract implements BridgeInterface {
|
||||||
break;
|
break;
|
||||||
case 'list':
|
case 'list':
|
||||||
if(!isset($properties['defaultValue'])){
|
if(!isset($properties['defaultValue'])){
|
||||||
$this->inputs[$context][$name]['value']=reset($properties['values']);
|
$firstItem=reset($properties['values']);
|
||||||
|
if(is_array($firstItem)){
|
||||||
|
$firstItem=reset($firstItem);
|
||||||
|
}
|
||||||
|
$this->inputs[$context][$name]['value']=$firstItem;
|
||||||
}else{
|
}else{
|
||||||
$this->inputs[$context][$name]['value']=$properties['defaultValue'];
|
$this->inputs[$context][$name]['value']=$properties['defaultValue'];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue