Open medonagy45 opened 1 year ago
I have made a patch to make that happen
diff --git a/node_modules/react-native-paper/src/components/TextInput/Adornment/TextInputIcon.tsx b/node_modules/react-native-paper/src/components/TextInput/Adornment/TextInputIcon.tsx
index f84d907..46ee100 100644
--- a/node_modules/react-native-paper/src/components/TextInput/Adornment/TextInputIcon.tsx
+++ b/node_modules/react-native-paper/src/components/TextInput/Adornment/TextInputIcon.tsx
@@ -114,7 +114,7 @@ const TextInputIcon = ({
}, [forceTextInputFocus, forceFocus, isTextInputFocused, onPress]);
return (
- <View style={[styles.container, style]}>
+ <View style={[styles.container, {right: style.right,height: '100%'}]}>
<IconButton
icon={name}
style={styles.iconButton}
@@ -138,7 +138,7 @@ const styles = StyleSheet.create({
width: ICON_SIZE,
height: ICON_SIZE,
justifyContent: 'center',
- alignItems: 'center',
+ alignItems: 'flex-end'
},
iconButton: {
margin: 0,
Hi @medonagy45,
Could you please provide more details when the TextInput.Icon
component is not vertically aligned? A minimal repro would be highly appreciated.
I have made an example, where the icon by default is aligned to the center. It might be helpful, and it might be the case that the patch is not necessary.
If you decrease the height to 45 and make it outlined mode you'll see its not centered
How to vertically center textinput Icon when multiline as it is forced to top