Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RNMobile] Resolve Text Entry Issues/Errors in Alt Text Settings #33975

Merged
merged 5 commits into from
Sep 3, 2021
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useNavigation } from '@react-navigation/native';
/**
* WordPress dependencies
*/
import { useState } from '@wordpress/element';
import { useState, useEffect } from '@wordpress/element';
import { Icon, chevronRight } from '@wordpress/icons';
import { usePreferredColorSchemeStyle } from '@wordpress/compose';
import {
Expand Down Expand Up @@ -44,6 +44,10 @@ const BottomSheetTextControl = ( {

const [ value, onChangeText ] = useState( initialValue );

useEffect( () => {
onChange( value );
}, [ value ] );

const horizontalBorderStyle = usePreferredColorSchemeStyle(
styles.horizontalBorder,
styles.horizontalBorderDark
Expand Down Expand Up @@ -78,8 +82,7 @@ const BottomSheetTextControl = ( {
<TextInput
label={ label }
onChangeText={ ( text ) => onChangeText( text ) }
onChange={ onChange( value ) }
value={ value }
defaultValue={ value }
fluiddot marked this conversation as resolved.
Show resolved Hide resolved
multiline={ true }
placeholder={ placeholder }
placeholderTextColor={ '#87a6bc' }
Expand Down