Skip to content

Commit 019ed46

Browse files
committed
v0.3.2
- Fix bug: [\#9](#9) *undefined is not an object (evaluating '_this.updatePosition.bind')* in v0.3.1. - Fix bug: Wrong width of dropdown in very few cases.
1 parent 8ccc648 commit 019ed46

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ You can find them in the example.
2121

2222
## Update History
2323

24+
### v0.3.2
25+
- Fix bug: [\#9](https://github.com/sohobloo/react-native-modal-dropdown/issues/9) *undefined is not an object (evaluating '_this.updatePosition.bind')* in v0.3.1.
26+
- Fix bug: Wrong width of dropdown in very few cases.
27+
2428
### v0.3.1
2529
- Fix bug: [\#6](https://github.com/sohobloo/react-native-modal-dropdown/issues/6) Can not specify `height` style for `dropdownStyle`.
2630
- Remove `updatePosition` function.

components/ModalDropdown.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ export default class ModalDropdown extends Component {
5151
constructor(props) {
5252
super(props);
5353

54-
this.updatePosition = this.updatePosition.bind(this);
55-
5654
this._button = null;
5755
this._buttonFrame = null;
5856
this._nextValue = null;
@@ -207,7 +205,7 @@ export default class ModalDropdown extends Component {
207205
style.left = this._buttonFrame.x;
208206
} else {
209207
let dropdownWidth = (this.props.dropdownStyle && StyleSheet.flatten(this.props.dropdownStyle).width) ||
210-
(this.props.style && StyleSheet.flatten(this.props.style.width)) || -1;
208+
(this.props.style && StyleSheet.flatten(this.props.style).width) || -1;
211209
if (dropdownWidth !== -1) {
212210
style.width = dropdownWidth;
213211
}

example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "Demo",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"private": true,
55
"scripts": {
66
"start": "node node_modules/react-native/local-cli/cli.js start"
77
},
88
"dependencies": {
99
"react": "15.3.1",
1010
"react-native": "0.33.0",
11-
"react-native-modal-dropdown": "0.3.1"
11+
"react-native-modal-dropdown": "0.3.2"
1212
}
1313
}

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-modal-dropdown",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"description": "A react-native dropdown component for both iOS and Android.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)