Skip to content

remove NativePicker usage and files #3088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions demo/src/demoApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,6 @@ import Storage, {DEFAULT_SCREEN} from './storage';
// gold: '#FFD700',
// });

// ThemeManager.setComponentTheme('Picker', (props) => {
// if (props.useNativePicker) {
// return {
// topBarProps: {
// doneLabel: Constants.isIOS ? 'Done2' : 'OK2',
// cancelLabel: Constants.isIOS ? 'Cancel2' : 'CANCEL2',
// },
// };
// }
// });

// const customAnimationsDefinitions = {
// customAnimation1: {
// from: {opacity: 0, translateY: 20},
Expand Down
6 changes: 3 additions & 3 deletions demo/src/screens/componentScreens/PickerScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class PickerScreen extends Component {
language2: options[2].value,
languages: [],
option: undefined,
nativePickerValue: 'java',
wheelPickerValue: 'java',
dialogPickerValue: 'java',
customModalValues: [],
filter: filters[0].value,
Expand Down Expand Up @@ -139,8 +139,8 @@ export default class PickerScreen extends Component {
label="Wheel Picker"
placeholder="Pick a Language"
useWheelPicker
value={this.state.nativePickerValue}
onChange={nativePickerValue => this.setState({nativePickerValue})}
value={this.state.wheelPickerValue}
onChange={wheelPickerValue => this.setState({wheelPickerValue})}
trailingAccessory={<Icon source={dropdown}/>}
// containerStyle={{marginTop: 20}}
// renderPicker={() => {
Expand Down
2 changes: 0 additions & 2 deletions docs/getting-started/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ The following are optional dependencies:
- @react-native-community/blur
- @react-native-community/datetimepicker
- @react-native-community/netinfo
- @react-native-picker/picker


## Install Native Dependencies
Expand All @@ -60,7 +59,6 @@ Some of the components are using the native dependencies listed below - those ar
- "@react-native-community/blur": ">=3.4.1" (required for Card component when passing `enableBlur` prop)
- "@react-native-community/datetimepicker": "^2.1.0"
- "@react-native-community/netinfo": "^5.6.2" (required for ConnectionStatusBar component)
- "@react-native-picker/picker": "^1.9.4" (required for Picker component when passing `useNativePicker` prop)

## Demo App

Expand Down
134 changes: 0 additions & 134 deletions src/components/picker/NativePicker.js

This file was deleted.

1 change: 0 additions & 1 deletion src/components/picker/api/picker.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"images": [
"https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Picker/Default.gif?raw=true",
"https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Picker/MultiPicker.gif?raw=true",
"https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Picker/NativePicker.gif?raw=true",
"https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Picker/DialogPicker.gif?raw=true",
"https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Picker/CustomPicker.gif?raw=true"
],
Expand Down
1 change: 0 additions & 1 deletion src/components/picker/api/pickerItem.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"images": [
"https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Picker/Default.gif?raw=true",
"https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Picker/MultiPicker.gif?raw=true",
"https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Picker/NativePicker.gif?raw=true",
"https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Picker/DialogPicker.gif?raw=true",
"https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/Picker/CustomPicker.gif?raw=true"
],
Expand Down
6 changes: 0 additions & 6 deletions src/components/picker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import TextField from '../textField';
import Icon from '../icon';
import View from '../view';
import Text from '../text';
// import NativePicker from './NativePicker';
import PickerItemsList from './PickerItemsList';
import PickerItem from './PickerItem';
import PickerContext from './PickerContext';
Expand Down Expand Up @@ -63,7 +62,6 @@ const Picker = React.forwardRef((props: PickerProps, ref) => {
searchPlaceholder,
renderCustomSearch,
renderCustomDialogHeader,
// useNativePicker,
useWheelPicker,
useDialog,
renderPicker,
Expand Down Expand Up @@ -285,10 +283,6 @@ const Picker = React.forwardRef((props: PickerProps, ref) => {
}
};

// if (useNativePicker) {
// return <NativePicker {...themeProps}/>;
// }

return (
//TODO : fix the ExpandableOverlay ts error
<PickerContext.Provider value={contextValue}>
Expand Down
5 changes: 0 additions & 5 deletions src/components/picker/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,6 @@ export type PickerBaseProps = Omit<NewTextFieldProps, 'value' | 'onChange'> & {
* Render a custom header for Picker's dialog
*/
renderCustomDialogHeader?: (callbacks: {onDone?: () => void, onCancel?: ()=> void}) => React.ReactElement;
// /**
// * @deprecated pass useWheelPicker prop instead
// * Allow to use the native picker solution (different style for iOS and Android)
// */
// useNativePicker?: boolean;
/**
* Use wheel picker instead of a list picker
*/
Expand Down