Skip to content

Commit 1fd2f74

Browse files
committed
Merge pull request gcanti#117 from APSL/android_04
refs gcanti#103 Android picker & gcanti#90 Picker props
2 parents f3d4559 + f9f0bd2 commit 1fd2f74

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ npm install tcomb-form-native
66

77
# Supported react-native versions
88

9-
- tcomb-form-native ^0.4: react-native >= 0.13.0
9+
- tcomb-form-native ^0.4: react-native >= 0.20.0
1010
- tcomb-form-native ^0.3: react-native < 0.13.0
1111

1212
### Domain Driven Forms

lib/components.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,11 @@ class Select extends Component {
329329
locals.options = this.getOptions();
330330

331331
[
332-
'help'
332+
'help',
333+
'enabled',
334+
'mode',
335+
'prompt',
336+
'itemStyle'
333337
].forEach((name) => locals[name] = this.props.options[name]);
334338

335339
return locals;

lib/templates/bootstrap/select.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var React = require('react-native');
2-
var { View, Text, PickerIOS } = React;
2+
var { View, Text, Picker } = React;
33

44
function select(locals) {
55

@@ -21,23 +21,28 @@ function select(locals) {
2121
var help = locals.help ? <Text style={helpBlockStyle}>{locals.help}</Text> : null;
2222
var error = locals.hasError && locals.error ? <Text style={errorBlockStyle}>{locals.error}</Text> : null;
2323

24-
var options = locals.options.map(({value, text}) => <PickerIOS.Item key={value} value={value} label={text} />);
24+
var options = locals.options.map(({value, text}) => <Picker.Item key={value} value={value} label={text} />);
2525

2626
return (
2727
<View style={formGroupStyle}>
2828
{label}
29-
<PickerIOS
29+
<Picker
3030
ref="input"
3131
style={selectStyle}
3232
selectedValue={locals.value}
3333
onValueChange={locals.onChange}
34+
help={locals.help}
35+
enabled={locals.enabled}
36+
mode={locals.mode}
37+
prompt={locals.prompt}
38+
itemStyle={locals.itemStyle}
3439
>
3540
{options}
36-
</PickerIOS>
41+
</Picker>
3742
{help}
3843
{error}
3944
</View>
4045
);
4146
}
4247

43-
module.exports = select;
48+
module.exports = select;

0 commit comments

Comments
 (0)