Disable navigation bar right button when it's transparent.

Reviewed By: chaceliang

Differential Revision: D2863157

fb-gh-sync-id: ca73545303607333fe32cd8e2e8f040134ee1d24
This commit is contained in:
Hedger Wang 2016-01-26 01:27:14 -08:00 committed by facebook-github-bot-7
parent c1aed7ba41
commit 1edcf4c6ac
1 changed files with 7 additions and 3 deletions

View File

@ -134,9 +134,13 @@ var NavigatorBreadcrumbNavigationBar = React.createClass({
this._setPropsIfExists('title_' + index, TITLE_PROPS[index]);
}
var right = this.refs['right_' + index];
if (right &&
interpolate.RightItem(RIGHT_BUTTON_PROPS[index].style, amount)) {
right.setNativeProps(RIGHT_BUTTON_PROPS[index]);
const rightButtonStyle = RIGHT_BUTTON_PROPS[index].style;
if (right && interpolate.RightItem(rightButtonStyle, amount)) {
right.setNativeProps({
style: rightButtonStyle,
pointerEvents: rightButtonStyle.opacity === 0 ? 'none' : 'auto',
});
}
},