react-native-international-phone-number 0.11.3 → 0.11.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -547,7 +547,7 @@ export default function App() {
547
547
  | `modalNotFoundCountryMessage` | `string` | Message when no countries found |
548
548
  | `disabledModalBackdropPress` | `boolean` | Disable modal close on backdrop press |
549
549
  | `removedModalBackdrop` | `boolean` | Remove modal backdrop entirely |
550
- | `onModalBackdropPress` | `() => void` | Callback when modal backdrop is pressed |
550
+ | `onModalBackdropPress` | `(closeModal: () => void) => void` | Callback when modal backdrop is pressed |
551
551
  | `onModalRequestClose` | `() => void` | Callback when modal close is requested |
552
552
  | `showModalAlphabetFilter` | `boolean` | Show alphabet filter in modal |
553
553
  | `showModalSearchInput` | `boolean` | Show search input in modal |
package/lib/index.js CHANGED
@@ -587,11 +587,15 @@ const PhoneInput = forwardRef(
587
587
  }
588
588
  visibleCountries={visibleCountries}
589
589
  popularCountries={popularCountries}
590
- onBackdropPress={() =>
591
- onModalBackdropPress || setShow(false)
590
+ onBackdropPress={(closeModal) =>
591
+ onModalBackdropPress
592
+ ? onModalBackdropPress(closeModal)
593
+ : setShow(false)
592
594
  }
593
595
  onRequestClose={() =>
594
- onModalRequestClose || setShow(false)
596
+ onModalRequestClose
597
+ ? onModalRequestClose()
598
+ : setShow(false)
595
599
  }
596
600
  countrySelectStyle={modalStyles}
597
601
  isFullScreen={isFullScreen}
@@ -52,7 +52,7 @@ interface BasePhoneInput extends TextInputProps {
52
52
  modalNotFoundCountryMessage?: string;
53
53
  disabledModalBackdropPress?: boolean;
54
54
  removedModalBackdrop?: boolean;
55
- onModalBackdropPress?: () => void;
55
+ onModalBackdropPress?: (closeModal: () => void) => void;
56
56
  onModalRequestClose?: () => void;
57
57
  customFlag?: (
58
58
  country: ICountry
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-international-phone-number",
3
3
  "author": "AstrOOnauta (https://github.com/AstrOOnauta)",
4
- "version": "0.11.3",
4
+ "version": "0.11.4",
5
5
  "description": "International mobile phone input component with mask for React Native",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -44,8 +44,8 @@
44
44
  "react-native": "*"
45
45
  },
46
46
  "dependencies": {
47
- "react-native-country-select": "0.3.7",
48
- "libphonenumber-js": "1.12.28"
47
+ "react-native-country-select": "0.3.8",
48
+ "libphonenumber-js": "1.12.29"
49
49
  },
50
50
  "devDependencies": {
51
51
  "metro-react-native-babel-preset": "^0.61.0"