Skip to content

Commit

Permalink
Merge pull request #308 from hossein-zare/dev-5.x
Browse files Browse the repository at this point in the history
5.1.10
  • Loading branch information
hossein-zare authored May 11, 2021
2 parents fe82f97 + b7de3e5 commit ff862b5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ declare module "react-native-dropdown-picker" {
showArrowIcon?: boolean;
showBadgeDot?: boolean;
showTickIcon?: boolean;
ArrowUpComponent?: (props: {style: StyleProp<ViewStyle>}) => JSX.Element;
ArrowDownComponent?: (props: {style: StyleProp<ViewStyle>}) => JSX.Element;
ArrowUpIconComponent?: (props: {style: StyleProp<ViewStyle>}) => JSX.Element;
ArrowDownIconComponent?: (props: {style: StyleProp<ViewStyle>}) => JSX.Element;
TickIconComponent?: (props: {style: StyleProp<ViewStyle>}) => JSX.Element;
CloseIconComponent?: (props: {style: StyleProp<ViewStyle>}) => JSX.Element;
ListEmptyComponent?: (props: ListEmptyComponentPropsInterface) => JSX.Element;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-dropdown-picker",
"version": "5.1.9",
"version": "5.1.10",
"description": "A single / multiple, categorizable, customizable, localizable and searchable item picker (drop-down) component for react native which supports both Android & iOS.",
"keywords": [
"picker",
Expand Down
16 changes: 8 additions & 8 deletions src/components/Picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ function Picker({
showArrowIcon = true,
showBadgeDot = true,
showTickIcon = true,
ArrowUpComponent = null,
ArrowDownComponent = null,
ArrowUpIconComponent = null,
ArrowDownIconComponent = null,
TickIconComponent = null,
CloseIconComponent = null,
ListEmptyComponent = null,
Expand Down Expand Up @@ -708,10 +708,10 @@ function Picker({
return null;

let Component;
if (open && ArrowUpComponent !== null)
Component = <ArrowUpComponent style={_arrowIconStyle} />;
else if (! open && ArrowDownComponent !== null)
Component = <ArrowDownComponent style={_arrowIconStyle} />;
if (open && ArrowUpIconComponent !== null)
Component = <ArrowUpIconComponent style={_arrowIconStyle} />;
else if (! open && ArrowDownIconComponent !== null)
Component = <ArrowDownIconComponent style={_arrowIconStyle} />;
else
Component = <Image source={open ? ICON.ARROW_UP : ICON.ARROW_DOWN} style={_arrowIconStyle} />;

Expand All @@ -723,8 +723,8 @@ function Picker({
}, [
showArrowIcon,
open,
ArrowUpComponent,
ArrowDownComponent,
ArrowUpIconComponent,
ArrowDownIconComponent,
_arrowIconStyle,
_arrowIconContainerStyle,
ICON
Expand Down

0 comments on commit ff862b5

Please sign in to comment.