mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-29 17:12:37 +00:00
[change] Remove 'placeholderTextColor' from 'createElement' props
TextInput converts the 'placeholderTextColor' prop to a style.
This commit is contained in:
@@ -18,6 +18,7 @@ import css from '../StyleSheet/css';
|
||||
import filterSupportedProps from '../View/filterSupportedProps';
|
||||
import findNodeHandle from '../findNodeHandle';
|
||||
import React from 'react';
|
||||
import StyleSheet from '../StyleSheet';
|
||||
import TextInputState from '../../modules/TextInputState';
|
||||
|
||||
const isAndroid = canUseDOM && /Android/i.test(navigator && navigator.userAgent);
|
||||
@@ -111,6 +112,7 @@ class TextInput extends React.Component<TextInputProps> {
|
||||
returnKeyType,
|
||||
secureTextEntry = false,
|
||||
spellCheck,
|
||||
style,
|
||||
value
|
||||
} = this.props;
|
||||
|
||||
@@ -163,10 +165,13 @@ class TextInput extends React.Component<TextInputProps> {
|
||||
onKeyPress: this._handleKeyPress,
|
||||
onSelect: normalizeEventHandler(this._handleSelectionChange),
|
||||
placeholder,
|
||||
placeholderTextColor,
|
||||
readOnly: !editable,
|
||||
ref: this._setNode,
|
||||
spellCheck: spellCheck != null ? spellCheck : autoCorrect,
|
||||
style: StyleSheet.compose(
|
||||
style,
|
||||
placeholderTextColor && { placeholderTextColor }
|
||||
),
|
||||
value
|
||||
});
|
||||
|
||||
|
||||
@@ -70,7 +70,6 @@ const createDOMProps = (component, props, styleResolver) => {
|
||||
disabled: providedDisabled,
|
||||
importantForAccessibility,
|
||||
nativeID,
|
||||
placeholderTextColor,
|
||||
pointerEvents,
|
||||
style: providedStyle,
|
||||
testID,
|
||||
@@ -171,10 +170,7 @@ const createDOMProps = (component, props, styleResolver) => {
|
||||
// STYLE
|
||||
const reactNativeStyle = StyleSheet.compose(
|
||||
pointerEvents && pointerEventsStyles[pointerEvents],
|
||||
StyleSheet.compose(
|
||||
providedStyle,
|
||||
placeholderTextColor && { placeholderTextColor }
|
||||
)
|
||||
providedStyle
|
||||
);
|
||||
|
||||
// Additional style resets for interactive elements
|
||||
|
||||
Reference in New Issue
Block a user