octopitus / rn-sliding-up-panel

Draggable sliding up panel implemented in React Native https://octopitus.github.io/rn-sliding-up-panel/
MIT License
930 stars 157 forks source link

re-render of panel will cause panel not dismissable by backdrop click #176

Open JunWangMaster opened 4 years ago

JunWangMaster commented 4 years ago
  <SlidingUpPanel ref={c => this._panel = c}
      draggableRange={{top: 180, bottom:0}}
      animatedValue={new Animated.Value(0)}
      backdropOpacity={0.2}
      friction={0.2} >
    <View style={{
          flex: 1,
          backgroundColor: 'green',
          alignItems: 'flex-start',
          justifyContent: 'space-around',
          flexDirection: 'row',
          borderRadius: 16,
        }}>
        <Text>Test test + {this.state.dynamicUpdated}</Text>
    </View>

as long as the this.state.dynamicUpdated changed and panel re-rendered, the backdrop is operatable, which is not desired, since backdropOpacity={0.2}, the panel is supposed to be dismissable by a single click in the backdrop