feat: allow clicking keyboard hints throughout #266
@@ -43,7 +43,7 @@ export function KeyHint({
|
|||||||
<>
|
<>
|
||||||
{prefix != null && <>{prefix} </>}
|
{prefix != null && <>{prefix} </>}
|
||||||
{keyList.map((k, i) => (
|
{keyList.map((k, i) => (
|
||||||
<Fragment key={k}>
|
<Fragment key={`${k}-${i}`}>
|
||||||
{i > 0 && (separator != null ? <> {separator} </> : ' ')}
|
{i > 0 && (separator != null ? <> {separator} </> : ' ')}
|
||||||
<Kbd className={chipClass}>{k}</Kbd>
|
<Kbd className={chipClass}>{k}</Kbd>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|
|||||||
|
|||||||
Reference in New Issue
Block a user
⚠️ Potential issue | 🟡 Minor
Prevent React key collisions for repeated labels in
KeyHint.<Fragment key={k}>uses the label as the React key; ifkeyListcontains duplicate labels (e.g."Shift"twice), reconciliation can be incorrect. Use a composite key with the index.Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents
✅ Addressed in commit
dd850d2