From dd45cb9dbcff67a55469b77bd5679d29a2722c81 Mon Sep 17 00:00:00 2001 From: Hossein Zare Date: Tue, 25 May 2021 02:03:44 +0430 Subject: [PATCH 1/3] Update setItems typedef. --- index.d.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/index.d.ts b/index.d.ts index 89728e99..47be0c3d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1,4 @@ -import {ComponentType, SetStateAction} from "react"; +import {ComponentType, SetStateAction, Dispatch} from "react"; import { FlatListProps, LayoutChangeEvent, @@ -206,9 +206,7 @@ declare module "react-native-dropdown-picker" { max?: number; addCustomItem?: boolean; setOpen: (open: boolean) => void; - //setItems(callback: SetStateAction): void; - setItems?: (callback: (state: ItemType[]) => ItemType[]) => void; - //setValue(callback: SetStateAction): void; + setItems?: Dispatch>; setValue: (callback: (state: ValueType | ValueType[] | null) => ValueType | ValueType[] | null) => void; disableBorderRadius?: boolean; containerProps?: ViewProps; From 4349bd192fe95c33bcc6c52781d2111e9a71c90e Mon Sep 17 00:00:00 2001 From: Hossein Zare Date: Tue, 25 May 2021 02:04:52 +0430 Subject: [PATCH 2/3] Import native TouchableOpacity. --- src/components/Picker.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/Picker.js b/src/components/Picker.js index 57764de4..b74a9684 100644 --- a/src/components/Picker.js +++ b/src/components/Picker.js @@ -10,6 +10,7 @@ import React, { import { View, + TouchableOpacity, Text, Image, FlatList, @@ -22,8 +23,6 @@ import { StyleSheet } from 'react-native'; -import { TouchableOpacity } from 'react-native-gesture-handler'; - const {height: WINDOW_HEIGHT} = Dimensions.get('window'); import Colors from '../constants/colors'; From 30ec15582b52c04fecdcae13a91345cb9b8f0b21 Mon Sep 17 00:00:00 2001 From: Hossein Zare Date: Tue, 25 May 2021 02:05:29 +0430 Subject: [PATCH 3/3] 5.1.17 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2d685c4e..1394f5e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-dropdown-picker", - "version": "5.1.16", + "version": "5.1.17", "description": "A single / multiple, categorizable, customizable, localizable and searchable item picker (drop-down) component for react native which supports both Android & iOS.", "keywords": [ "picker",