fix(editing): regression bug in disable editing (#3687)
This commit is contained in:
1 parent
4c88a4a2fd
commit
4dc2acdefa
4 files changed
+26
-21
No files matched your search
@@ -131,6 +131,7 @@ const SegmentItem = ({
|
||||
{/* Icons that show only when hovering */}
|
||||
<div className="hidden group-hover/row:flex">
|
||||
<HoveringIcons
|
||||
disableEditing={disableEditing}
|
||||
onEdit={onEdit}
|
||||
isLocked={isLocked}
|
||||
isVisible={isVisible}
|
||||
@@ -147,6 +148,7 @@ const SegmentItem = ({
|
||||
};
|
||||
|
||||
const HoveringIcons = ({
|
||||
disableEditing,
|
||||
onEdit,
|
||||
isLocked,
|
||||
isVisible,
|
||||
@@ -172,7 +174,7 @@ const HoveringIcons = ({
|
||||
|
||||
return (
|
||||
<div className="flex items-center">
|
||||
{createIcon('row-edit', onEdit)}
|
||||
{!disableEditing && createIcon('row-edit', onEdit)}
|
||||
{createIcon(
|
||||
isLocked ? 'row-lock' : 'row-unlock',
|
||||
onToggleLocked,
|
||||
|
||||
@@ -104,18 +104,20 @@ const SegmentationGroupTable = ({
|
||||
</div>
|
||||
) : (
|
||||
<div className="mt-1 select-none">
|
||||
<SegmentationDropDownRow
|
||||
segmentations={segmentations}
|
||||
disableEditing={disableEditing}
|
||||
activeSegmentation={activeSegmentation}
|
||||
onActiveSegmentationChange={onActiveSegmentationChange}
|
||||
onSegmentationDelete={onSegmentationDelete}
|
||||
onSegmentationEdit={onSegmentationEdit}
|
||||
onSegmentationDownload={onSegmentationDownload}
|
||||
storeSegmentation={storeSegmentation}
|
||||
onSegmentationAdd={onSegmentationAdd}
|
||||
onToggleSegmentationVisibility={onToggleSegmentationVisibility}
|
||||
/>
|
||||
{!disableEditing && (
|
||||
<SegmentationDropDownRow
|
||||
segmentations={segmentations}
|
||||
disableEditing={disableEditing}
|
||||
activeSegmentation={activeSegmentation}
|
||||
onActiveSegmentationChange={onActiveSegmentationChange}
|
||||
onSegmentationDelete={onSegmentationDelete}
|
||||
onSegmentationEdit={onSegmentationEdit}
|
||||
onSegmentationDownload={onSegmentationDownload}
|
||||
storeSegmentation={storeSegmentation}
|
||||
onSegmentationAdd={onSegmentationAdd}
|
||||
onToggleSegmentationVisibility={onToggleSegmentationVisibility}
|
||||
/>
|
||||
)}
|
||||
{!disableEditing && showAddSegment && (
|
||||
<AddSegmentRow onClick={() => onSegmentAdd(activeSegmentationId)} />
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user