Skip to content

Commit eb880ae

Browse files
Table: enable editing overlay for editable columns only
1 parent 945c49a commit eb880ae

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

client/packages/lowcoder/src/components/table/EditableCell.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,19 @@ export function EditableCell<T extends JSONValue>(props: EditableCellProps<T>) {
131131
{status === "toSave" && !isEditing && <EditableChip />}
132132
{normalView}
133133
{/* overlay on normal view to handle double click for editing */}
134-
<div
135-
style={{
136-
position: 'absolute',
137-
top: 0,
138-
left: 0,
139-
width: '100%',
140-
height: '100%',
141-
}}
142-
onDoubleClick={enterEditFn}
143-
>
144-
</div>
134+
{editable && (
135+
<div
136+
style={{
137+
position: 'absolute',
138+
top: 0,
139+
left: 0,
140+
width: '100%',
141+
height: '100%',
142+
}}
143+
onDoubleClick={enterEditFn}
144+
>
145+
</div>
146+
)}
145147
</ColumnTypeView>
146148
);
147149
}

0 commit comments

Comments
 (0)