fix in listview and kanban, confighandle is appearing for subcontainer child widgets

This commit is contained in:
Nakul Nagargade 2025-03-11 13:08:52 +05:30
parent 3fa0626266
commit fd36e34470
2 changed files with 6 additions and 4 deletions

View file

@ -14,6 +14,7 @@ export const ConfigHandle = ({
showHandle,
componentType,
visibility,
subContainerIndex,
}) => {
const shouldFreeze = useStore((state) => state.getShouldFreeze());
const componentName = useStore((state) => state.getComponentDefinition(id)?.component?.name || '', shallow);
@ -35,12 +36,12 @@ export const ConfigHandle = ({
const anyComponentHovered = state.getHoveredComponentForGrid() !== '' || state.hoveredComponentBoundaryId !== '';
// If one component is hovered and one is selected, show the handle for the hovered component
return (
isWidgetHovered ||
(showHandle &&
(!isMultipleComponentsSelected || (isModal && isModalOpen)) &&
!anyComponentHovered)
(subContainerIndex === 0 || subContainerIndex === null) &&
(isWidgetHovered ||
(showHandle && (!isMultipleComponentsSelected || (isModal && isModalOpen)) && !anyComponentHovered))
);
}, shallow);
let height = visibility === false ? 10 : widgetHeight;
return (

View file

@ -90,6 +90,7 @@ const WidgetWrapper = memo(
showHandle={isWidgetActive}
componentType={componentType}
visibility={visibility}
subContainerIndex={subContainerIndex}
/>
)}
<RenderWidget