mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-09 23:15:58 -06: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:
parent
0a7d9a69f7
commit
af2fc30b95
@ -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}>
|
||||
|
Loading…
Reference in New Issue
Block a user