From 96eb7a4c45b87e88c826425531d5430c60a92a7d Mon Sep 17 00:00:00 2001 From: Sherfin Shamsudeen Date: Tue, 21 Dec 2021 20:28:18 +0530 Subject: [PATCH] Display validation error outside dropdown component (#1618) --- frontend/src/Editor/Components/DropDown.jsx | 42 +++++++++++---------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/frontend/src/Editor/Components/DropDown.jsx b/frontend/src/Editor/Components/DropDown.jsx index 7a57f0c3aa..ece706326b 100644 --- a/frontend/src/Editor/Components/DropDown.jsx +++ b/frontend/src/Editor/Components/DropDown.jsx @@ -42,27 +42,29 @@ export const DropDown = function DropDown({ height, validate, properties, styles }, [JSON.stringify(values)]); return ( -
-
- -
-
- { - setCurrentValue(newVal); - setExposedVariable('value', newVal).then(() => fireEvent('onSelect')); - }} - filterOptions={fuzzySearch} - placeholder="Select.." - /> + <> +
+
+ +
+
+ { + setCurrentValue(newVal); + setExposedVariable('value', newVal).then(() => fireEvent('onSelect')); + }} + filterOptions={fuzzySearch} + placeholder="Select.." + /> +
{validationError}
-
+ ); };