diff --git a/src/Resources/contao/drivers/DC_Folder.php b/src/Resources/contao/drivers/DC_Folder.php index 1dd58c25a3..a6886948fb 100644 --- a/src/Resources/contao/drivers/DC_Folder.php +++ b/src/Resources/contao/drivers/DC_Folder.php @@ -444,6 +444,14 @@ public function showAll() $icon = $GLOBALS['TL_DCA'][$this->strTable]['list']['sorting']['icon'] ?: 'filemounts.svg'; $label = Image::getHtml($icon) . ' '; + // Pass previously selected values to picker (#1816) + $prevPickerValue = ''; + + if ($this->strPickerFieldType) + { + $prevPickerValue = ' data-picker-value="' . htmlspecialchars(json_encode(array_map('strval', $this->arrPickerValue))) . '"'; + } + // Build the tree $return = $this->panel() . Message::generate() . '