Open Ferin79 opened 3 years ago
Were you able to solve it facing the same issue
I have checked in class component, facing same issue, using below version "react": "17.0.2", "react-native": "0.67.3",
I was playing around this repo and find that onHandleChange is working, we can use it to update trimmerLeftHandlePosition & trimmerRightHandlePosition
<Trimmer
onHandleChange= {this.onHandleChange}
totalDuration={totalDuration}
trimmerLeftHandlePosition={trimmerLeftHandlePosition}
trimmerRightHandlePosition={trimmerRightHandlePosition}
minimumTrimDuration={minimumTrimDuration}
maxTrimDuration={maxTrimDuration}
maximumZoomLevel={200}
zoomMultiplier={20}
initialZoomValue={2}
scaleInOnInit={true}
tintColor="#f638dc"
markerColor="#5a3d5c"
trackBackgroundColor="#382039"
trackBorderColor="#5a3d5c"
scrubberColor="#b7e778"
scrubberPosition={scrubberPosition}
onScrubbingComplete={this.onScrubbingComplete}
onLeftHandlePressIn={() => console.log('onLeftHandlePressIn')}
onRightHandlePressIn={() => console.log('onRightHandlePressIn')}
onScrubberPressIn={() => console.log('onScrubberPressIn')}
/>
onHandleChange = ({ leftPosition, rightPosition }) => { console.log("leftPosition: "+leftPosition+", rightPosition"+rightPosition); this.setState({ trimmerRightHandlePosition: rightPosition, trimmerLeftHandlePosition: leftPosition }) }
onLeftHandleChange & onRightHandleChange not calling in Functional Component.