From 337fef165d0032796fe5ae47e87c6f72f7cae7dc Mon Sep 17 00:00:00 2001
From: juanf <juanf@ethz.ch>
Date: Wed, 5 Apr 2023 13:14:16 +0200
Subject: [PATCH] SSDM-13549: Bugfix dropdown performance in Chrome

---
 .../eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js
index 669c7a70623..99898c52ea0 100644
--- a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js
+++ b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js
@@ -1026,10 +1026,12 @@ var FormUtil = new function() {
 		
 		$component.append($("<option>").attr('value', '').attr('selected', '').attr('disabled', '').text(alt));
 		$component.append($("<option>").attr('value', '').text('(empty)'));
-
+        var $options = [];
 		for(var i = 0; i < terms.length; i++) {
-			$component.append($("<option>").attr('value',terms[i].code).text(terms[i].label));
+		    var $option = $("<option>", { value : terms[i].code }).text(terms[i].label);
+			$options.push($option);
 		}
+		$component.append($options);
 		Select2Manager.add($component);
 		return $component;
 	}
-- 
GitLab