Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(input, rn): add deps to input callbacks (#13683)

Gabriel Borleabb71a4bb7d5d
diff --git a/react/features/base/ui/components/native/Input.tsx b/react/features/base/ui/components/native/Input.tsx
index d569225f09..05b9f29f5d 100644
--- a/react/features/base/ui/components/native/Input.tsx
+++ b/react/features/base/ui/components/native/Input.tsx
@@ -80,31 +80,31 @@ const Input = forwardRef<TextInput, IProps>(({
const { nativeEvent: { text } } = e;
onChange?.(text);
- }, []);
+ }, [ onChange ]);
const clearInput = useCallback(() => {
onChange?.('');
- }, []);
+ }, [ onChange ]);
const handleBlur = useCallback((e: NativeSyntheticEvent<TextInputFocusEventData>) => {
setFocused(false);
onBlur?.(e);
- }, []);
+ }, [ onBlur ]);
const handleFocus = useCallback((e: NativeSyntheticEvent<TextInputFocusEventData>) => {
setFocused(true);
onFocus?.(e);
- }, []);
+ }, [ onFocus ]);
const handleKeyPress = useCallback((e: NativeSyntheticEvent<TextInputKeyPressEventData>) => {
onKeyPress?.(e);
- }, []);
+ }, [ onKeyPress ]);
const handleSubmitEditing = useCallback((e: NativeSyntheticEvent<TextInputSubmitEditingEventData>) => {
const { nativeEvent: { text } } = e;
onSubmitEditing?.(text);
- }, []);
+ }, [ onSubmitEditing ]);
return (<View style = { [ styles.inputContainer, customStyles?.container ] }>
{label && <Text style = { styles.label }>{ label }</Text>}