From f75b5eb4d4fb786d36c136cea73b8e15ba4190e9 Mon Sep 17 00:00:00 2001 From: Sherfin Shamsudeen Date: Sat, 25 Dec 2021 16:34:15 +0530 Subject: [PATCH 1/4] Add onClick event to Image widget (#1639) --- frontend/src/Editor/Components/Image.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/Editor/Components/Image.jsx b/frontend/src/Editor/Components/Image.jsx index 92db56dd24..8f6fc63529 100644 --- a/frontend/src/Editor/Components/Image.jsx +++ b/frontend/src/Editor/Components/Image.jsx @@ -1,7 +1,7 @@ import React from 'react'; import LazyLoad from 'react-lazyload'; -export const Image = function Image({ height, properties, styles }) { +export const Image = function Image({ height, properties, styles, fireEvent }) { const source = properties.source; const widgetVisibility = styles.visibility ?? true; @@ -12,7 +12,7 @@ export const Image = function Image({ height, properties, styles }) { return (
} debounce={500}> - + fireEvent('onClick')} />
); From 315760b6f8718d250d35af1d0576632c91da482f Mon Sep 17 00:00:00 2001 From: Navaneeth Pk Date: Sat, 25 Dec 2021 16:39:40 +0530 Subject: [PATCH 2/4] Fixes canvas max-width (#1637) --- frontend/src/Editor/Container.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/Editor/Container.jsx b/frontend/src/Editor/Container.jsx index a7219f294a..2e9b59617d 100644 --- a/frontend/src/Editor/Container.jsx +++ b/frontend/src/Editor/Container.jsx @@ -48,7 +48,7 @@ export const Container = ({ const styles = { width: currentLayout === 'mobile' ? deviceWindowWidth : '100%', height: 2400, - maxWidth: '1292px', + maxWidth: `${canvasWidth}px`, position: 'absolute', backgroundSize: `${canvasWidth / 43}px 10px`, }; From 248b61dee6db8b26170c47b3e27f0bd343ff50e2 Mon Sep 17 00:00:00 2001 From: Sherfin Shamsudeen Date: Sun, 26 Dec 2021 20:17:53 +0530 Subject: [PATCH 3/4] Set dropdown value to invalid if value is not present in available values (#1641) * Set dropdown value to invalid if value is not present in available values * Reset to default value if existing value is not selectable --- frontend/src/Editor/Components/DropDown.jsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/Editor/Components/DropDown.jsx b/frontend/src/Editor/Components/DropDown.jsx index ece706326b..2859e8275d 100644 --- a/frontend/src/Editor/Components/DropDown.jsx +++ b/frontend/src/Editor/Components/DropDown.jsx @@ -27,14 +27,18 @@ export const DropDown = function DropDown({ height, validate, properties, styles }, [isValid]); useEffect(() => { - setCurrentValue(value); - setExposedVariable('value', value); + let newValue = undefined; + if (values?.includes(value)) newValue = value; + + setCurrentValue(newValue); + setExposedVariable('value', newValue); // eslint-disable-next-line react-hooks/exhaustive-deps }, [value]); useEffect(() => { let newValue = undefined; - if (values?.includes(value)) newValue = value; + if (values?.includes(currentValue)) newValue = currentValue; + else if (values?.includes(value)) newValue = value; setCurrentValue(newValue); setExposedVariable('value', newValue); From 17265c02684e9c1a23c9839d2db54a089f7270e6 Mon Sep 17 00:00:00 2001 From: Sherfin Shamsudeen Date: Sun, 26 Dec 2021 20:22:50 +0530 Subject: [PATCH 4/4] Bump version to v0.12.2 --- .version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.version b/.version index aac2dacab4..e96a87111c 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.12.1 \ No newline at end of file +0.12.2 \ No newline at end of file