When I click on an option, the popup menu goes away but nothing happens.
See original GitHub issueThe setup is as follows:
'use strict';
import React, { Component, PropTypes } from 'react';
import { View, TextInput, Image, Platform } from 'react-native';
import ImagePicker from 'react-native-image-picker';
import styles from '../lib/styles';
import constants from '../lib/constants';
const {
AMAZON_AWS_URL,
} = constants;
class UserProfilePage extends Component {
constructor(props) {
super(props);
this.startImagePicker = this.startImagePicker.bind(this);
}
startImagePicker() {
// More info on all the options is below in the README...just some common use cases shown here
const options = {
title: null,
storageOptions: {
skipBackup: true,
path: 'images'
}
};
/**
* The first arg is the options object for customization (it can also be null or omitted for default options),
* The second arg is the callback which sends object: response (more info below in README)
*/
ImagePicker.showImagePicker(options, (response) => {
console.log('Response = ', response);
if (response.didCancel) {
console.log('User cancelled image picker');
}
else if (response.error) {
console.log('ImagePicker Error: ', response.error);
}
else {
// You can display the image using either data...
const source = {uri: 'data:image/jpeg;base64,' + response.data, isStatic: true};
// or a reference to the platform specific asset location
if (Platform.OS === 'ios') {
const source = {uri: response.uri.replace('file://', ''), isStatic: true};
} else {
const source = {uri: response.uri, isStatic: true};
}
this.setState({
avatarSource: source
});
}
});
}
render() {
return(
<View style={styles.container}>
<View style={styles.profileImageContainer2}>
<Image style={styles.profileImage2} source={{uri: AMAZON_AWS_URL + this.props.user.photo}} />
</View>
<Button style={styles.uploadButton} textStyle={styles.white} onPress={this.startImagePicker}>Upload</Button>
</View>
);
}
}
and here are my dependencies:
"react": "15.2.1",
"react-native": "0.28.0",
"react-native-image-picker": "^0.21.2",
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Issues with popups and drop down menus on Windows 10
I have been having issues with drop down menus and pop ups. They disappear before being able to select an option.
Read more >Mac Air M1 dropdown menu not responding. - Apple Community
applications work fine, but you can't use the dropdown menus. Running one external monitor. The problem goes away with a restart.
Read more >Windows 10 Start Menu Not Opening: 7 Things to Try
The Windows 10 Shut down menu will appear and you can choose to either Sign out or do a full Restart.
Read more >Menu select item stuck on screen after context or command ...
Go to Start -> Run -> and type tskill dwm . This command will reset the desktop window manager without the need to...
Read more >Right Click Context Menu Not Disappearing - YouTube
Right Click Context Menu Not Disappearing - Box Remaining On Screen In Windows 10/8/7 FIX. This error which causes the context menu (or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay,
first off: thanks for all of the quick responses.
Second: I went through the manual android installation and the only thing that
rnpm link
didn’t do was add any of the permissions to the androidmanifest.xml file. After adding those permissions everything worked appropriately without even adding theonActivityResult
functions to my MainActivity.java files. Tested on Android 6.0.1 on debug mode withreact-native run-android
Third: I tested on iOS to see if there were similar errors but it ran perfectly with no edits.
With that being said, I think that there should be a bug ticket for
rnpm link
to add the proper permissions? Other than that, it works great! Thanks for all of the help, fellas!Best, Aaron
Glad you got it working! I’m not sure if permissions falls to the responsibility of
rnpm
, but it might be worth starting the discussion over on that repo…cheers!