Text: Enabling RCTVirtualText for iOS
Summary: Without this change native RCTVirtualText module is unactive on iOS. This can cause bags in Text rendering because failback module (RCTVirtualText) does not popagate dirty status upward. Depends on D6842304. Reviewed By: yungsters, AaaChiuuu Differential Revision: D6854770 fbshipit-source-id: ab8b7acd67309b7351c0074293ee6515a55385ce
This commit is contained in:
parent
74f386633d
commit
00099093dc
|
@ -22,6 +22,7 @@ const ReactNativeViewAttributes = require('ReactNativeViewAttributes');
|
||||||
const StyleSheetPropType = require('StyleSheetPropType');
|
const StyleSheetPropType = require('StyleSheetPropType');
|
||||||
const TextStylePropTypes = require('TextStylePropTypes');
|
const TextStylePropTypes = require('TextStylePropTypes');
|
||||||
const Touchable = require('Touchable');
|
const Touchable = require('Touchable');
|
||||||
|
const UIManager = require('UIManager');
|
||||||
|
|
||||||
const createReactClass = require('create-react-class');
|
const createReactClass = require('create-react-class');
|
||||||
const createReactNativeComponentClass = require('createReactNativeComponentClass');
|
const createReactNativeComponentClass = require('createReactNativeComponentClass');
|
||||||
|
@ -333,7 +334,7 @@ var RCTText = createReactNativeComponentClass(
|
||||||
);
|
);
|
||||||
var RCTVirtualText = RCTText;
|
var RCTVirtualText = RCTText;
|
||||||
|
|
||||||
if (Platform.OS === 'android') {
|
if (UIManager.RCTVirtualText) {
|
||||||
RCTVirtualText = createReactNativeComponentClass('RCTVirtualText', () => ({
|
RCTVirtualText = createReactNativeComponentClass('RCTVirtualText', () => ({
|
||||||
validAttributes: mergeFast(ReactNativeViewAttributes.UIView, {
|
validAttributes: mergeFast(ReactNativeViewAttributes.UIView, {
|
||||||
isHighlighted: true,
|
isHighlighted: true,
|
||||||
|
|
Loading…
Reference in New Issue