From 7dc1d460c6caaa31a8482973b624eddeb5e78def Mon Sep 17 00:00:00 2001 From: Dave Miller Date: Wed, 17 Feb 2016 08:53:43 -0800 Subject: [PATCH] Fix the Portal display to not rerender the entire tree Summary:public We now wrap the in an where we can control the accessibility at a high level. This was only used to turn it off for the faded out background view when we show a pop up. We use setNativeProps instead of setState to avoid the render. We really just want to pass this value to the native Android View. Reviewed By: davidaurelio Differential Revision: D2928371 fb-gh-sync-id: 19c34471c33650acb526a2f5a02b6070e844e8d0 shipit-source-id: 19c34471c33650acb526a2f5a02b6070e844e8d0 --- Libraries/ReactIOS/renderApplication.android.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Libraries/ReactIOS/renderApplication.android.js b/Libraries/ReactIOS/renderApplication.android.js index 05b87178b..1abfeb8b3 100644 --- a/Libraries/ReactIOS/renderApplication.android.js +++ b/Libraries/ReactIOS/renderApplication.android.js @@ -73,8 +73,8 @@ var AppContainer = React.createClass({ return; } - this.setState({ - rootImportanceForAccessibility: modalVisible ? 'no-hide-descendants' : 'auto', + this.refs.accessibilityWrapper.setNativeProps({ + importantForAccessibility: modalVisible ? 'no-hide-descendants' : 'auto', }); }, @@ -85,10 +85,14 @@ var AppContainer = React.createClass({ ref="main" collapsable={!this.state.inspectorVisible} style={styles.appContainer}> - + + + ;