react-native-animated-segment-control icon indicating copy to clipboard operation
react-native-animated-segment-control copied to clipboard

Added componentDidUpdate() to updated selectedIndex

Open craig95 opened this issue 5 years ago • 0 comments

When selectedIndex prop is changed the component doesn't update the selectedIndex state, the component then doesn't animate the segment to the updated position. To fix this I added componentDidUpdate which checks if the props changed, if they did I update the state and animate the segment to the new position.

craig95 avatar Mar 27 '20 12:03 craig95