Skip to content

Commit e4ca97d

Browse files
committed
fix updating props.
1 parent cb3808c commit e4ca97d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ export default class ModalPicker extends Component {
2121
};
2222
}
2323

24+
componentWillReceiveProps( nextProps ) {
25+
this.setState({
26+
dataSource: this.state.dataSource.cloneWithRows( nextProps.data )
27+
});
28+
}
29+
2430
setModalVisible(visible) {
2531
this.setState({ modalVisible: visible });
2632
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-simple-modal-picker",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Simple Picker/DropDown/Chooser/Selector for React Native",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)