Skip to content

Commit 0de03bf

Browse files
committed
v0.4.0
1 parent 608a410 commit 0de03bf

4 files changed

Lines changed: 9 additions & 8 deletions

File tree

README.md

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

2222
## Update History
2323

24-
### v0.4.0-rc.2
25-
- Enhancement: Compatible with `react-native` v0.36.0 which has a [break change](https://github.com/facebook/react-native/commit/0a9b6bedb312eba22c5bc11498b1cc41363e5f27) causes the default button with zero size.
26-
27-
### v0.4.0-rc.1
28-
- New feature: [\#11](https://github.com/sohobloo/react-native-modal-dropdown/issues/11) Open `renderSeparator` prop API.
24+
### v0.4.0
2925
- New feature:
3026
[\#10](https://github.com/sohobloo/react-native-modal-dropdown/issues/10) Support touchable component in `renderRow`.
27+
- New feature: [\#11](https://github.com/sohobloo/react-native-modal-dropdown/issues/11) Open `renderSeparator` prop API.
28+
- New feature: Add `adjustFrame` prop for user to adjust the frame style of the dropdown in case the component calculate a mistake frame. \(refer to [#9](https://github.com/sohobloo/react-native-modal-dropdown/issues/5)\) \([code sample](https://github.com/sohobloo/react-native-modal-dropdown/commit/0861d0a1bbe11c221696e8c664ef03ed475a3849#diff-f8c408fd257ff44ce4b01e5f8422b1e1)\)
29+
- Enhancement: Compatible with `react-native` v0.36.0 which has a [break change](https://github.com/facebook/react-native/commit/0a9b6bedb312eba22c5bc11498b1cc41363e5f27) causes the default button with zero size.
30+
- Enhancement: [#16](https://github.com/sohobloo/react-native-modal-dropdown/issues/16) Prevent from warnings if array of styles is used instead of stylesheet or object. Thanks to @NikolaBorislavovHristov .
3131

3232
### v0.3.2
3333
- 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.
@@ -89,6 +89,7 @@ Prop | Type | Optional | Default | Description
8989
`style` | object | Yes | | Style of the button.
9090
`textStyle` | object | Yes | | Style of the button text. **Invalid in wrapper mode.**
9191
`dropdownStyle` | object | Yes | | Style of the dropdown list.
92+
`adjustFrame` | func | Yes | | This is a callback after the frame of the dropdown have been calculated and before showing. You will receive a style object as argument with some of the props like `width` `height` `top` `left` and `right`. Change them to appropriate values that accord with your requirement and **make the new style as the return value of this function**.
9293
`renderRow` | func | Yes | | Customize render option rows. **Will render a default row if `null`/`undefined`.**
9394
`renderSeparator` | func | Yes | | Customize render dropdown list separators. **Will render a default thin gray line if `null`/`undefined`.**
9495
`onDropdownWillShow`| func | Yes | | Trigger when dropdown will show by touching the button. **Return `false` can cancel the event.**

example/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class Demo extends Component {
143143
}
144144

145145
_dropdown_3_adjustFrame(style) {
146-
console.log(`frameStyle={width:${style.width}, height:${style.height}, top:${style.top}, left:${style.left}}`);
146+
console.log(`frameStyle={width:${style.width}, height:${style.height}, top:${style.top}, left:${style.left}, right:${style.right}}`);
147147
style.top -= 15;
148148
style.left += 150;
149149
return style;

example/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-demo",
3-
"version": "0.4.0-rc.2",
3+
"version": "0.4.0",
44
"description": "A demo for react-native-modal-dropdown component.",
55
"homepage": "https://github.com/sohobloo/react-native-modal-dropdown",
66
"license": "MIT",

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.4.0-rc.2",
3+
"version": "0.4.0",
44
"description": "A react-native dropdown component for both iOS and Android.",
55
"keywords": [
66
"react",

0 commit comments

Comments
 (0)