Skip to content
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
CC_TEST_REPORTER_ID: 9b36beb22e04451e6414fcc28926f995c253d94877f616b50d192255196fbb68
docker:
# specify the version you desire here
- image: circleci/node:12.19.0-stretch-browsers
- image: circleci/node:12.22-bullseye-browsers

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
Expand Down
44 changes: 32 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,47 @@
module.exports = {
parserOptions: {
sourceType: 'module',
ecmaVersion: 2022,
env: {
node: true,
jest: true,
browser: true,
es2021: true,
},
extends: ['eslint:recommended', 'plugin:react/recommended'],
settings: {
react: {
version: 'detect',
},
},
env: {
node: true,
jest: true,
es6: true,
},
globals: {
shallow: true,
extends: ['plugin:react/recommended', 'airbnb', 'airbnb/hooks', 'prettier'],
plugins: ['react', 'react-native'],
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
'import/no-extraneous-dependencies': 0,
'lodash/import-scope': 0,
'lodash/prefer-lodash-method': 0,
'lodash/prefer-noop': 0,
'react/prop-types': 'off',
'import/prefer-default-export': 0,
'react/prop-types': 0,
'react/jsx-props-no-spreading': 0,
'react/destructuring-assignment': 0,
'react/static-property-placement': 0,
'react/forbid-prop-types': 0,
'react/no-arrow-function-lifecycle': 0,
'react/no-unused-class-component-methods': 0,
'react/jsx-filename-extension': 0,
'arrow-body-style': 0,
'default-param-last': 0,
},
};
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## 8.1.0

##### New

- Dark mode support (#513)
- donePressed on onClose callback (#319)
- testID available on each item (#498)

##### Bugfix

- Fixed reliance on now-private dep (#513)

---

## 8.0.4

##### Bugfix
Expand Down
12 changes: 7 additions & 5 deletions README.md

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
ModalProps,
ScrollView,
TextInputProps,
TextStyle,
TouchableOpacityProps,
Expand All @@ -24,11 +25,13 @@ export interface Item {

export interface PickerStyle {
chevron?: ViewStyle;
chevronDark?: ViewStyle;
chevronActive?: ViewStyle;
chevronContainer?: ViewStyle;
chevronDown?: ViewStyle;
chevronUp?: ViewStyle;
done?: TextStyle;
doneDark?: TextStyle;
doneDepressed?: TextStyle;
headlessAndroidContainer?: ViewStyle;
headlessAndroidPicker?: ViewStyle;
Expand All @@ -39,7 +42,9 @@ export interface PickerStyle {
inputIOSContainer?: ViewStyle;
inputWeb?: TextStyle;
modalViewBottom?: ViewStyle;
modalViewBottomDark?: ViewStyle;
modalViewMiddle?: ViewStyle;
modalViewMiddleDark?: ViewStyle;
modalViewTop?: ViewStyle;
placeholder?: TextStyle;
viewContainer?: ViewStyle;
Expand Down Expand Up @@ -85,6 +90,9 @@ export interface PickerSelectProps {
touchableWrapperProps?: CustomTouchableWrapperProps;
Icon?: React.ReactNode;
InputAccessoryView?: React.ReactNode;
scrollViewRef?: React.RefObject<ScrollView>;
scrollViewContentOffsetY?: number;
darkTheme?: boolean;
}

declare class Picker extends React.Component<PickerSelectProps> {
Expand Down
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-picker-select",
"version": "8.0.4",
"version": "8.1.0",
"description": "A Picker component for React Native which emulates the native <select> interfaces for each platform",
"license": "MIT",
"author": "Michael Lefkowitz <lefkowitz.michael@gmail.com>",
Expand Down Expand Up @@ -35,11 +35,17 @@
"enzyme-adapter-react-16": "^1.7.0",
"enzyme-to-json": "^3.3.5",
"eslint": "^8.29.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-react-native": "^4.0.0",
"husky": "^2.4.0",
"jest": "^23.6.0",
"prettier": "^2.0.5",
"pretty-quick": "^2.0.1",
"prettier": "^2.8.8",
"pretty-quick": "^3.1.3",
"prop-types": "^15.7.2",
"react": "16.6.1",
"react-dom": "^16.6.1",
Expand Down
3 changes: 2 additions & 1 deletion src/PickerAvoidingView/index.ios.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { Component } from 'react';
import { StyleSheet, View } from 'react-native';
import PropTypes from 'prop-types';
import { PickerStateContext } from '../PickerStateProvider';
import { IOS_MODAL_HEIGHT } from '../constants';
import PropTypes from 'prop-types';

/**
* PickerAvoidingView is a React component that adjusts the view layout to avoid
Expand All @@ -16,6 +16,7 @@ import PropTypes from 'prop-types';
* @param {React.ReactNode} props.children - The child components that should be
* protected from obstruction by the picker modal
*/
// eslint-disable-next-line react/prefer-stateless-function
export class PickerAvoidingView extends Component {
static propTypes = {
enabled: PropTypes.bool,
Expand Down
1 change: 1 addition & 0 deletions src/PickerStateProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export class PickerStateProvider extends React.Component {
}

render() {
// eslint-disable-next-line react/jsx-no-constructed-context-values
const context = {
isModalShown: this.state.isModalShown,
setIsModalShown: (isModalShown) => {
Expand Down
Loading