Skip to content

Commit

Permalink
withPickerValues now checks the disabled prop
Browse files Browse the repository at this point in the history
  • Loading branch information
Anze Vavpetic committed Oct 24, 2019
1 parent a8b0bc0 commit 8de9578
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-formik",
"version": "0.0.1",
"version": "0.0.2",
"description": "Make the most of your React Native forms with Formik",
"main": "index.js",
"type": "index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion src/withPickerValues/PickerModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class PickerModal extends PureComponent<PropsType> {
};

renderPicker = () => {
const { placeholder, value } = this.props;
const { placeholder, value, disabled } = this.props;
if (!this.props.values || !this.props.values.length) return null;
const values = [...this.props.values];
if (Platform.OS === "ios") {
Expand All @@ -36,6 +36,7 @@ class PickerModal extends PureComponent<PropsType> {
onValueChange={this.onValueChange}
selectedValue={value}
prompt={placeholder}
enabled={!disabled}
>
{values.map(item => (
<Picker.Item key={item.value} {...item} />
Expand Down

0 comments on commit 8de9578

Please sign in to comment.