mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-30 03:00:41 -04:00
fix(rnd): Add null checking & remove console logs on Input UI component (#7927)
fix(rnd): And null checking & remove logs
This commit is contained in:
@@ -157,7 +157,7 @@ export function CustomNode({ data, id, width, height }: NodeProps<CustomNode>) {
|
||||
current[lastKey.key] = value;
|
||||
}
|
||||
|
||||
console.log(`Updating hardcoded values for node ${id}:`, newValues);
|
||||
// console.log(`Updating hardcoded values for node ${id}:`, newValues);
|
||||
|
||||
if (!isInitialSetup.current) {
|
||||
history.push({
|
||||
|
||||
@@ -11,8 +11,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
||||
// The HTMLvalue will only be updated if the value prop changes, but the user can still type in the input.
|
||||
ref = ref || React.createRef<HTMLInputElement>();
|
||||
React.useEffect(() => {
|
||||
if (ref?.current?.value !== value) {
|
||||
console.log("Value changed from", ref?.current?.value, "to", value);
|
||||
if (ref && ref.current && ref.current.value !== value) {
|
||||
ref.current.value = value;
|
||||
}
|
||||
}, [value]);
|
||||
|
||||
Reference in New Issue
Block a user