-
Notifications
You must be signed in to change notification settings - Fork 111
Open
Description
DropdownCascade disables multiplesupport. This can be easily activated if we change the DropdownCascade's getJsValues function to:
/**
* Will mark current value as selected from a list
* of possible values.
*
* @param string|int $value the current field value
*/
private function getJsValues(array $values, $value): array
{
foreach ($values as $k => $v) {
if (!$this->multiple) {
if ($v['value'] === $value) {
$values[$k]['selected'] = true;
break;
}
} else {
if (in_array($v['value'], explode(',', $value))) {
$values[$k]['selected'] = true;
}
}
}
return $values;
}
Plus we have to remove line
ui/src/Form/Control/DropdownCascade.php
Line 117 in 6b503a7
| $this->multiple = false; |
Happy to submit via PR, but unfortunately can only provide a demo example, but no behat test.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels