We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a377159 + e6b13a6 commit b1d7d7aCopy full SHA for b1d7d7a
lib/RNTextInput.tsx
@@ -7,7 +7,6 @@ import {
7
ViewStyle,
8
TextStyle,
9
ImageStyle,
10
- ViewProps,
11
TextInputProps,
12
} from "react-native";
13
import RNBounceable, {
@@ -50,13 +49,18 @@ const RNTextInput: React.FC<IRNTextInputProps> = ({
50
49
onPress,
51
...props
52
}) => {
+ const [placeholderText, setPlaceholderText] = React.useState<string | undefined>(placeholder);
53
+ React.useEffect(() => {
54
+ setPlaceholderText(placeholder)
55
+ }, []);
56
+
57
const renderContent = () => (
58
<View style={styles.contentContainer}>
59
<TextInput
60
placeholderTextColor="#ead4ff"
61
{...props}
62
ref={inputRef}
- placeholder={placeholder}
63
+ placeholder={placeholderText}
64
style={[styles.textInputStyle, textInputStyle]}
65
/>
66
{!disableButton && (
0 commit comments