mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-26 06:30:06 -05:00
Fixed an issue where rename panel was losing focus when trying to add name if input box is empty. #5675
This commit is contained in:
1 parent
0a7d9a69f7
commit
af2fc30b95
1 file changed
+6
-1
@@ -57,7 +57,12 @@ export default function RenamePanelContent({ closeModal, panel, title, preferenc
|
||||
|
||||
useEffect(() => {
|
||||
setHeight?.(containerRef.current?.offsetHeight);
|
||||
}, [containerRef.current, formData]);
|
||||
let focusTimeout = setTimeout(() => {
|
||||
firstEleRef.current && firstEleRef.current.focus();
|
||||
}, 150);
|
||||
|
||||
return () => clearTimeout(focusTimeout);
|
||||
}, [containerRef.current, firstEleRef.current, formData]);
|
||||
|
||||
return (
|
||||
<Box display="flex" flexDirection="column" className={classes.container} ref={containerRef}>
|
||||
|
||||
Reference in new issue
Block a user