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;
}
DropdownCascade disables
multiple
support. This can be easily activated if we change the DropdownCascade'sgetJsValues
function to:Plus we have to remove line https://github.com/atk4/ui/blob/6b503a72e051ca0aea0ddf0a18aecf77bf3b9adf/src/Form/Control/DropdownCascade.php#L117
Happy to submit via PR, but unfortunately can only provide a demo example, but no behat test.