---
name: "onCountrySelectResult"
mode: "kit"
versionRequirements:
  - { name: "BizKit", version: "3.0.0" }
  - { name: "@ray-js/ray", version: "0.3.23" }
platform:
  - "iOS"
  - "Android"
async: true
---

## onCountrySelectResult

> [VERSION] BizKit >= 3.0.0 | @ray-js/ray >= 0.3.23

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Description

Listen for selection results from the country selection page

### Parameters

`(listener: Function)`

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `listener` | `(params: CountrySelectResultResponse) => void` | Yes | - |  |

### Referenced Types

##### `interface` CountrySelectResultResponse

| Property | Type | Since | Description |
| --- | --- | --- | --- |
| `countryCode` | `string` | `3.0.0` | Dialing code |
| `countryAbb` | `string` | `3.0.0` | Country code |
| `countryName` | `string` | `3.0.0` | Country name |


### Examples

#### Demo

```tsx
import { onCountrySelectResult, openCountrySelectPage } from '@ray-js/ray'

onCountrySelectResult(e => {
  console.log('[event]', e);
});

openCountrySelectPage({
  success: data => {
    console.log('[open]', data);
  },
  fail: error => {
    console.error('[open]', error);
  },
});
```
