Update useEffect dependency (#3239)
This commit is contained in:
parent
dc146a1a16
commit
0682a92d87
|
|
@ -106,11 +106,11 @@ export const EditableText = (props: EditableTextProps) => {
|
|||
|
||||
useEffect(() => {
|
||||
setIsEditing(!!props.isEditingDefault);
|
||||
}, [props.defaultValue, props.isEditingDefault, setValue]);
|
||||
}, [props.defaultValue, props.isEditingDefault]);
|
||||
|
||||
useEffect(() => {
|
||||
if (props.forceDefault === true) setValue(props.defaultValue);
|
||||
}, [props.forceDefault, props.defaultValue, setValue]);
|
||||
}, [props.forceDefault, props.defaultValue]);
|
||||
|
||||
// at times onTextChange is not fired
|
||||
// for example when the modal is closed on clicking the overlay
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user