From 1c2b1f0a55bfef4833f540258b07378d834ffb81 Mon Sep 17 00:00:00 2001 From: Kiran Ashok Date: Mon, 11 Apr 2022 17:03:11 +0530 Subject: [PATCH] bugfix :: calendar clone issue (#2763) --- frontend/src/Editor/Inspector/Inspector.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/Editor/Inspector/Inspector.jsx b/frontend/src/Editor/Inspector/Inspector.jsx index 6eed99663a..d5edfed6a8 100644 --- a/frontend/src/Editor/Inspector/Inspector.jsx +++ b/frontend/src/Editor/Inspector/Inspector.jsx @@ -50,7 +50,7 @@ export const Inspector = ({ let childComponents = []; - if (component.component.component === 'Tabs') { + if ((component.component.component === 'Tabs') | (component.component.component === 'Calendar')) { childComponents = Object.keys(allComponents).filter((key) => allComponents[key].parent?.startsWith(component.id)); } else { childComponents = Object.keys(allComponents).filter((key) => allComponents[key].parent === component.id); @@ -60,7 +60,7 @@ export const Inspector = ({ let childComponent = JSON.parse(JSON.stringify(allComponents[componentId])); childComponent.id = uuidv4(); - if (component.component.component === 'Tabs') { + if ((component.component.component === 'Tabs') | (component.component.component === 'Calendar')) { const childTabId = childComponent.parent.split('-').at(-1); childComponent.parent = `${clonedComponent.id}-${childTabId}`; } else {