react-native-international-phone-number 0.11.2 → 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 +6 -4
- package/lib/index.js +7 -3
- package/lib/interfaces/phoneInputProps.ts +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -99,14 +99,16 @@
|
|
|
99
99
|
|
|
100
100
|
## Installation
|
|
101
101
|
|
|
102
|
+
To use this library, make sure you have **react-native-international-phone-number** installed along with its required dependency **react-native-safe-area-context**:
|
|
103
|
+
|
|
102
104
|
```bash
|
|
103
|
-
|
|
105
|
+
npm install react-native-international-phone-number react-native-safe-area-context
|
|
104
106
|
```
|
|
105
107
|
|
|
106
|
-
|
|
108
|
+
Since **react-native-safe-area-context** includes native code, you’ll need to install the iOS pods on macOS to complete the linking:
|
|
107
109
|
|
|
108
110
|
```bash
|
|
109
|
-
|
|
111
|
+
npx pod-install ios
|
|
110
112
|
```
|
|
111
113
|
|
|
112
114
|
## Additional config to WEB
|
|
@@ -545,7 +547,7 @@ export default function App() {
|
|
|
545
547
|
| `modalNotFoundCountryMessage` | `string` | Message when no countries found |
|
|
546
548
|
| `disabledModalBackdropPress` | `boolean` | Disable modal close on backdrop press |
|
|
547
549
|
| `removedModalBackdrop` | `boolean` | Remove modal backdrop entirely |
|
|
548
|
-
| `onModalBackdropPress` | `() => void`
|
|
550
|
+
| `onModalBackdropPress` | `(closeModal: () => void) => void` | Callback when modal backdrop is pressed |
|
|
549
551
|
| `onModalRequestClose` | `() => void` | Callback when modal close is requested |
|
|
550
552
|
| `showModalAlphabetFilter` | `boolean` | Show alphabet filter in modal |
|
|
551
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
|
|
590
|
+
onBackdropPress={(closeModal) =>
|
|
591
|
+
onModalBackdropPress
|
|
592
|
+
? onModalBackdropPress(closeModal)
|
|
593
|
+
: setShow(false)
|
|
592
594
|
}
|
|
593
595
|
onRequestClose={() =>
|
|
594
|
-
onModalRequestClose
|
|
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.
|
|
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.
|
|
48
|
-
"libphonenumber-js": "1.12.
|
|
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"
|