feat: Introduce a generic inline rename input component for document editing

This commit is contained in:
2025-12-03 12:00:57 +01:00
parent e1dd1990d7
commit e66451afbd
5 changed files with 59 additions and 64 deletions
@@ -48,6 +48,11 @@ export const useDocumentsNavigation = ({
const handleKeyDown = useCallback(
(event: React.KeyboardEvent) => {
// Only handle events that target the container directly
if (event.target !== event.currentTarget) {
return;
}
const { key, shiftKey } = event;
const triggers = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Home', 'End', 'Enter', ' ', 'Space', 'Spacebar'];
if (!triggers.includes(key)) {