Skip to content

Commit cf91c2b

Browse files
asimoneclaude
andcommitted
Fix lock icon alignment and stable row height when deletions hidden
Both lock states now share the same position offset. Delete button uses visibility:hidden so row height stays consistent. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent db8e27c commit cf91c2b

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

β€Žsrc/components/BindingTable.jsxβ€Ž

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export default function BindingTable({ bindings, keyColors = {}, selectedId, onS
9696
<th>{t('colAction')}</th>
9797
<th className="cell-del-head">
9898
<button className="btn-lock" onClick={e => { e.stopPropagation(); setLocked(v => !v); }} title={locked ? t('unlockDelete') : t('lockDelete')}>
99-
<span style={locked ? {} : { position: 'relative', left: '4px' }}>{locked ? 'πŸ”’' : 'πŸ”“'}</span>
99+
<span style={{ position: 'relative', left: '4px' }}>{locked ? 'πŸ”’' : 'πŸ”“'}</span>
100100
</button>
101101
</th>
102102
</tr>
@@ -180,13 +180,12 @@ export default function BindingTable({ bindings, keyColors = {}, selectedId, onS
180180
)}
181181
</td>
182182
<td className="cell-del">
183-
{!locked && (
184-
<button
185-
className="btn-del"
186-
title={t('removeBinding')}
187-
onClick={e => { e.stopPropagation(); onRemove(b.key, b.modifiers); }}
188-
>βœ•</button>
189-
)}
183+
<button
184+
className="btn-del"
185+
style={{ visibility: locked ? 'hidden' : 'visible' }}
186+
title={t('removeBinding')}
187+
onClick={e => { e.stopPropagation(); if (!locked) onRemove(b.key, b.modifiers); }}
188+
>βœ•</button>
190189
</td>
191190
</tr>
192191
);

0 commit comments

Comments
Β (0)