diff --git a/src/components/SelectCountry/index.tsx b/src/components/SelectCountry/index.tsx index fc7c335..3b7680b 100644 --- a/src/components/SelectCountry/index.tsx +++ b/src/components/SelectCountry/index.tsx @@ -20,6 +20,7 @@ const SelectCountryComponent: ( valueField, labelField, imageField, + iconField, selectedTextStyle, imageStyle, } = props; @@ -59,10 +60,10 @@ const SelectCountryComponent: ( {...props} renderItem={_renderItem} renderLeftIcon={() => { - if (selectItem?.image) { + if (selectItem && selectItem[iconField]) { return ( );