From fcdeb57542c40c7bb5347c91aef3ed65531e1f06 Mon Sep 17 00:00:00 2001 From: joseph kim Date: Wed, 17 Aug 2016 10:37:24 -0700 Subject: [PATCH 1/2] [FEATURE] lazy rendering options --- src/menu/makeMenuContext.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/menu/makeMenuContext.js b/src/menu/makeMenuContext.js index c2d7e60..c97d73b 100644 --- a/src/menu/makeMenuContext.js +++ b/src/menu/makeMenuContext.js @@ -120,9 +120,12 @@ module.exports = (React, ReactNative, { constants, model, styles }) => { }, onLayout() { const handle = ReactNative.findNodeHandle(this.refs.Container); - UIManager.measure(handle, (x, y, w, h, px, py) => { - this._ownMeasurements = {x, y, w, h, px, py}; - }); + const waitFor = this.props.lazyRender || 0 + setTimeout(()=>{ + UIManager.measure(handle, (x, y, w, h, px, py) => { + this._ownMeasurements = {x, y, w, h, px, py}; + }); + }, waitFor) }, _registerMenu(name, hooks) { if (this._menus[name]) { From 6c0d4e9c0981afc4165ad992f3ecf3bc176c73db Mon Sep 17 00:00:00 2001 From: joseph kim Date: Wed, 31 May 2017 15:17:09 -0700 Subject: [PATCH 2/2] [FIX][Android] event flashing menu --- src/menu/makeAnimatedOptionsContainer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/menu/makeAnimatedOptionsContainer.js b/src/menu/makeAnimatedOptionsContainer.js index 99e89c4..c4efe4a 100644 --- a/src/menu/makeAnimatedOptionsContainer.js +++ b/src/menu/makeAnimatedOptionsContainer.js @@ -6,7 +6,7 @@ module.exports = (React, ReactNative) => { const AnimatedOptionsContainer = React.createClass({ mixins: [TimerMixin], getInitialState() { - return { scaleAnim: new Animated.Value(0.001) }; + return { scaleAnim: new Animated.Value(0.01) }; }, componentDidMount() { this.setTimeout(() => {