-
Notifications
You must be signed in to change notification settings - Fork 25k
Closed
Labels
Good first issueInterested in collaborating? Take a stab at fixing one of these issues.Interested in collaborating? Take a stab at fixing one of these issues.Help Wanted
Issues ideal for external contributors.Issues ideal for external contributors.Platform: iOSiOS applications.iOS applications.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
There seems to be a bug with ActivityIndicatorIOS in the latest stable release.
- Set
animating={false}dynamically works as expected (ActivityIndicatorIOS is hidden) - Set
animation={false}as initial prop won't hide it.
Reproduce
I assume that HMR is enabled for steps 3-5. Otherwise just use the template below.
- Fresh project: react-native init helloWorld
- Add
<ActivityIndicatorIOS animating={false} />toindex.ios.js - Run the simulator, e.g. via
react-native run-ios--> Is shown and not animated - Change prop to
<ActivityIndicatorIOS animating={true} />--> Is shown and animated - Change prop back to
<ActivityIndicatorIOS animating={false} />--> Is hidden as it should
Template
...
import {
AppRegistry,
ActivityIndicatorIOS,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
...
class helloWorld extends Component {
constructor(props) {
super(props);
this.state = {
animateActivityIndicatorIOS: false,
}
}
render() {
return (
<View style={styles.container}>
<TouchableOpacity onPress={() => this.setState({animateActivityIndicatorIOS: !this.state.animateActivityIndicatorIOS})}>
<Text>Toggle ActivityIndicatorIOS</Text>
</TouchableOpacity>
<Text>{'\n'}This ActivityIndicatorIOS should be shown initially, although animating=false:{'\n'}</Text>
<ActivityIndicatorIOS animating={this.state.animateActivityIndicatorIOS} />
</View>
);
}
}dozoisch and akshaysmurthy
Metadata
Metadata
Assignees
Labels
Good first issueInterested in collaborating? Take a stab at fixing one of these issues.Interested in collaborating? Take a stab at fixing one of these issues.Help Wanted
Issues ideal for external contributors.Issues ideal for external contributors.Platform: iOSiOS applications.iOS applications.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.