Skip to content

Commit

Permalink
Text: Enabling RCTVirtualText for iOS
Browse files Browse the repository at this point in the history
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
  • Loading branch information
shergin authored and facebook-github-bot committed Jan 31, 2018
1 parent 74f3866 commit 0009909
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Libraries/Text/Text.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const ReactNativeViewAttributes = require('ReactNativeViewAttributes');
const StyleSheetPropType = require('StyleSheetPropType');
const TextStylePropTypes = require('TextStylePropTypes');
const Touchable = require('Touchable');
const UIManager = require('UIManager');

const createReactClass = require('create-react-class');
const createReactNativeComponentClass = require('createReactNativeComponentClass');
Expand Down Expand Up @@ -333,7 +334,7 @@ var RCTText = createReactNativeComponentClass(
);
var RCTVirtualText = RCTText;

if (Platform.OS === 'android') {
if (UIManager.RCTVirtualText) {
RCTVirtualText = createReactNativeComponentClass('RCTVirtualText', () => ({
validAttributes: mergeFast(ReactNativeViewAttributes.UIView, {
isHighlighted: true,
Expand Down

0 comments on commit 0009909

Please sign in to comment.