Skip to content

Commit

Permalink
Merge pull request #136 from slauzinho/use-picker-from-react-native-c…
Browse files Browse the repository at this point in the history
…ommunity

Use picker from react native community
  • Loading branch information
ArtemKosiakevych authored Oct 5, 2020
2 parents 5eda1fe + b8b1fbc commit 107dc6b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"moment": "^2.24.0",
"react": "16.9.0",
"react-native": "0.61.5",
"@react-native-community/picker": "^1.8.0",
"react-native-wheel-picker-android": "../"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
},
"homepage": "https://github.com/kalontech/ReactNativeWheelPicker",
"dependencies": {
"@react-native-community/picker": "^1.8.0",
"moment": "^2.24.0"
}
}
4 changes: 3 additions & 1 deletion src/WheelPicker.ios.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import React, { useState } from "react";
import { Picker, View } from "react-native";
import { View } from "react-native";
import { Picker } from "@react-native-community/picker";

interface Props {
data: Array<string>;
selectedItem?: number;
onItemSelected?: Function;
disabled?: boolean;
}

const WheelPicker: React.FC<Props> = props => {
const [selectedItem, setSelectedItem] = useState(props.selectedItem || 0);
const { data, onItemSelected, disabled } = props;
Expand Down

0 comments on commit 107dc6b

Please sign in to comment.