From 3c6e6a9e08e7205acfa0b9f93327b8f6db33851f Mon Sep 17 00:00:00 2001
From: rhenck <richard.henck@iqb.hu-berlin.de>
Date: Fri, 17 Dec 2021 17:17:31 +0100
Subject: [PATCH] Make dropLists always start with a min-height

This makes the list not collapse when used in dynamic context.
---
 projects/common/ui-elements/drop-list/drop-list.ts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/projects/common/ui-elements/drop-list/drop-list.ts b/projects/common/ui-elements/drop-list/drop-list.ts
index cdce1fa1c..d81ae8e1d 100644
--- a/projects/common/ui-elements/drop-list/drop-list.ts
+++ b/projects/common/ui-elements/drop-list/drop-list.ts
@@ -33,6 +33,10 @@ export class DropListElement extends InputElement implements PositionedElement,
       serializedElement.value !== undefined ? serializedElement.value as DragNDropValueObject[] | null : [];
 
     this.height = serializedElement.height || 100;
+    this.positionProps.useMinHeight =
+      serializedElement.positionProps?.useMinHeight !== undefined ?
+        serializedElement.positionProps.useMinHeight as boolean :
+        true;
     this.surfaceProps.backgroundColor =
       serializedElement.surfaceProps?.backgroundColor as string ||
       serializedElement.backgroundColor as string ||
-- 
GitLab