Skip to content

Commit 7ec97f8

Browse files
committed
Fix text occasionally being reselected when while renaming
1 parent 122ac04 commit 7ec97f8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/tables/common.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ export function EditableNameField(props: EditableNameFieldProps) {
661661
textRef.current.focus();
662662
textRef.current.setSelectionRange(0, props.currentName.length - (props.extensionLength ?? 0));
663663
}
664-
}, [isRenaming, props]);
664+
}, [isRenaming, props.currentName, props.extensionLength]);
665665

666666
useEffect(() => {
667667
if (ref.current != null) {

0 commit comments

Comments
 (0)