mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
Fix ref setting
This commit is contained in:
@@ -312,16 +312,8 @@ const NodeCredentialsInput: FC<{
|
||||
);
|
||||
};
|
||||
|
||||
const InputRef = (value: any): React.RefObject<HTMLInputElement> => {
|
||||
const inputRef = React.useRef<HTMLInputElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (inputRef.current && value && inputRef.current.value !== value) {
|
||||
inputRef.current.value = value;
|
||||
}
|
||||
}, [value]);
|
||||
|
||||
return inputRef;
|
||||
const InputRef = (value: any): ((el: HTMLInputElement | null) => void) => {
|
||||
return (el) => el && (el.value = value);
|
||||
};
|
||||
|
||||
const NodeKeyValueInput: FC<{
|
||||
|
||||
Reference in New Issue
Block a user