Catalog npm
Back to packageRELEASE DETAILS

4.3.7

npm

42-react-native-picker

A Native Picker with high performance.

Published16 Jan 2023
Direct dependencies0
Transitive dependenciesNot calculated

README

Current package documentation

react-native-picker

npm version dependency status

ui3 ui4

Documentation

Params

KeyTypeDefaultSupportDescription
isLoopBooleanfalseAndroid
pickerTextEllipsisLennumber6Android
pickerConfirmBtnTextstringconfirmiOS/Android
pickerCancelBtnTextstringcanceliOS/Android
pickerTitleTextstringpls selectiOS/Android
pickerConfirmBtnColorarray[1, 186, 245, 1]iOS/Android
pickerCancelBtnColorarray[1, 186, 245, 1]iOS/Android
pickerTitleColorarray[20, 20, 20, 1]iOS/Android
pickerToolBarBgarray[232, 232, 232, 1]iOS/Android
pickerBgarray[196, 199, 206, 1]iOS/Android
pickerToolBarFontSizenumber16iOS/Android
wheelFlexarray[1, 1, 1]iOS/Android
pickerFontSizenumber16iOS/Android
pickerFontColorarray[31, 31, 31, 1]iOS/Android
pickerFontFamilystringiOS/Android
pickerRowHeightnumber24iOS
pickerDataarrayiOS/Android
selectedValuearrayiOS/Android
onPickerConfirmfunctioniOS/Android
onPickerCancelfunctioniOS/Android
onPickerSelectfunctioniOS/Android

Methods

KeySupportDescription
initiOS/Androidinit and pass parameters to picker
toggleiOS/Androidshow or hide picker
showiOS/Androidshow picker
hideiOS/Androidhide picker
selectiOS/Androidselect a row
isPickerShowiOS/Androidget status of picker, return a boolean

Usage

Step 1 - install

	npm install react-native-picker --save
	react-native link

Step 3 - import and use in project

import Picker from 'react-native-picker';
let data = [];
for(var i=0;i<100;i++){
    data.push(i);
}

Picker.init({
    pickerData: data,
    selectedValue: [59],
    onPickerConfirm: data => {
        console.log(data);
    },
    onPickerCancel: data => {
        console.log(data);
    },
    onPickerSelect: data => {
        console.log(data);
    }
});
Picker.show();
	

Integration With Existing Apps (iOS)

The Podfile will like below:

platform :ios, '8.0'
target 'YourTarget' do
    pod 'React', :path => '../YOUR_REACT_NATIVE_PROJECT/node_modules/react-native', :subspecs => [
    'Core',
    ...
    ]
    pod 'Picker', :path => '../YOUR_REACT_NATIVE_PROJECT/node_modules/react-native-picker'
end

After you have updated the Podfile of the existing app, you can install react-native-picker like below:

$ pod install

Notice

support two modes:

1. parallel: such as time picker, wheels have no connection with each other

2. cascade: such as date picker, address picker .etc, when front wheel changed, the behind wheels will all be reset

parallel:

  • single wheel:
pickerData = [1,2,3,4];
selectedValue = 3;
  • two or more wheel:
pickerData = [
    [1,2,3,4],
    [5,6,7,8],
    ...
];
selectedValue = [1, 5];

cascade:

  • two wheel
pickerData = [
    {
        a: [1, 2, 3, 4]
    },
    {
        b: [5, 6, 7, 8]
    },
    ...
];
selectedValue = ['a', 2];
  • three wheel
pickerData = [
    {
        a: [
            {
                a1: [1, 2, 3, 4]
            },
            {
                a2: [5, 6, 7, 8]
            },
            {
                a3: [9, 10, 11, 12]
            }
        ]
    },
    {
        b: [
            {
                b1: [11, 22, 33, 44]
            },
            {
                b2: [55, 66, 77, 88]
            },
            {
                b3: [99, 1010, 1111, 1212]
            }
        ]
    },
    {
        c: [
            {
                c1: ['a', 'b', 'c']
            },
            {
                c2: ['aa', 'bb', 'cc']
            },
            {
                c3: ['aaa', 'bbb', 'ccc']
            }
        ]
    },
    ...
]

For pure javascript version -> v3.0.5

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-Ym26Lz9blWKDAJ1iS++7eIt+bjQG3jluUWBG+i2ycxT3ViSebJGH2M/+XQJoqGO0+NegmMz7L8NSdNg3jCbBIw==",
  "shasum": "b648d38e8591f8415505d6bea8a13618aa0cd612",
  "tarball": "https://registry.npmjs.org/42-react-native-picker/-/42-react-native-picker-4.3.7.tgz",
  "fileCount": 1361,
  "unpackedSize": 4568958,
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQD3wj7BpzbHeFW7dKeNhuoy01aFokwVhn1z2/Khy3JI2AIgbsh+2nrT5XoBHYwx9wbc0aT+s0jybs3F7Kszd/QBDNc="
    }
  ],
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxRuKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr4vQ//TYOaKfPLPAZkvm0Sy4pmSeTAspVw0FvW9tjIp3tQgagKbXD9\r\n3i5g+JA0hWbz+e4YAvUNErQKndYjEwZfWfl7fabFvHjRC45sWx0NbAKtXN4H\r\nmtYlwLV3MlTJS/QI6gglTqJi3v2TDwpJCe3ACb2AW871t0/93Igkf6VP2AYq\r\nBoFjgakd6fQ2i3tGQ2Bl4MBAQAjgRZc1Cv2aR/PHFkujQVLV5QFVTiUeseOJ\r\nhLAjBVetNOY6xLzGG9DMTlUhr1RNc2oqO1G7fxQIOzcOO6YaipeZLThsTbpD\r\nrIYZqdT/Rgh+8g0VJv6NDEGkF8bLlAs0507F+FUS7suyvUwimO+Xfme4umor\r\n6I7rDUOd9MeRSsIdJ796mCIpR038IZ5OHx+ssxgB3GJorRoodDJBaygqMf8I\r\nMLu/IBdlnl4mRvpZ8WQo0cHbsij/ceuqZwPAVN8jbWeQcTo4/Csw/hTRjJbI\r\nTA36PAfB8rb1oaH9rPvuIxo6eeKKyKfAElY/MV0E1WHc7jmxWRrbZgEg4FvD\r\n1gNmxEFYWCBK5VvpTNJKRTqmZP9GwBFbGwqaD7uc5IvdmpD+wPotj3/qTw/W\r\n7LCwDhYFLI0m5vax5ieB8lEMQ6lfPi7YmKx5/gbDe8GgkV721mjmZwguDyIA\r\ncz1AuveJyRj/23wSV7Lt580qYbElnyYnqVE=\r\n=4I1I\r\n-----END PGP SIGNATURE-----\r\n"
}

Repository

PENDING
xz870603611/42-react-native-picker

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:59 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:0806e8767e8d6c4874fcc5ce86d0fdd68971e5604384d97bff810ea9eef009b9

Other collected versions

View all collected versions →