Name | Type | Default | Description |
Disabled | bool | false | Enables or disables the element. |
DropDownClassList | IEnumerable<object> | N/A | Sets additional class names to the Input drop down. |
DropDownButtonPosition | DropDownButtonPosition | DropDownButtonPosition.None | Determines the position of the drop down button. |
DropDownHeight | object | | Sets the height of the drop down. By default it's set to an empty string. In this case the height of the drop down is controlled by a CSS variable. |
DropDownWidth | object | | Sets the width of the drop down. By default it's set to an empty string. In this case the width of the drop down is controlled by a CSS variable. |
Messages | object | N/A | Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale. |
Name | string | "" | Sets or gets the name attribute for the element. Name is used when submiting data inside an HTML form. |
NationalMode | bool | false | Determines whether the input will be in international or national mode i.e whether the input will start with '+'. |
IsOpened | bool | false | Determines whether the drop down is opened or not. |
OnlyCountries | IEnumerable<object> | [] | Sets or gets an array of country codes which will be used instead of the default one with all countries. The country code should be ISO 3166-1 alpha-2 codes(https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). |
Placeholder | string | "" | Determines the placeholder of the input. |
SelectedCountry | string | "" | Sets or gets the selected country of the element. The country code should be ISO 3166-1 alpha-2 codes(https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). |
RightToLeft | bool | false | Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. |
Theme | string | "" | Determines the theme for the element. Themes define the look of the elements. |
Unfocusable | bool | false | If is set to true, the element cannot be focused. |
Value | string | "" | Sets or gets the value of the element. |
Name | Type | Arguments | Description |
Close | void | N/A | Closes the drop down. |
EnsureVisible | void | N/A | Ensures that the active ( selected ) item is always visible. |
GetIsOpenedAsync() | Task<bool> | 'N/A' | Gets the "IsOpened" property as Task<bool>. |
GetItemByDialCode | object | string dialCode | Returns an item by its country dial code. The item is an object with 'label', 'value', 'iso2' and 'dialCode' properties.Args: string dialCode - Returns the national or international phone number |
GetItemByDialCode | object | N/A | Returns an item by its country dial code. The item is an object with 'label', 'value', 'iso2' and 'dialCode' properties. |
GetNumber | string | bool isInternational | Returns the entered phone number with formatting.Args: bool isInternational - When you use 'false', the national phone number will be returned and the international phone number, when you use 'true' as parameter. |
GetNumber | string | N/A | Returns the entered phone number with formatting. |
GetSelectedItem | object | N/A | Returns the selected item. The item is an object with 'label', 'value', 'iso2' and 'dialCode' properties. |
GetValueAsync() | Task<string> | 'N/A' | Gets the "Value" property as Task<string>. |
IsValidNumber | bool | N/A | Returns true or false depending on whether the entered phone number is valid. |
Open | void | N/A | Opens the drop down. |
Refresh | void | 'N/A' | Refreshes the Blazor Component. Performs a layout of the HTML Elements and recalculates the measurements. |
Render | void | 'N/A' | Re-renders the Blazor Component. This method will make a full re-render. |
Select | void | N/A | Selects the text inside the input or if it is <b>readonly</b> then the element is focused. |
StateHasChanged | void | 'N/A' | Refreshes the state and Re-renders the Blazor Component, if necessary. |
Validate | void | N/A | Validates the entered phone number. |
Name | Type | Description | Event Detail |
OnChange | EventCallback<Event> | This event is triggered when the selection is changed. | string label- The label of the new selected item., dynamic oldLabel- The label of the item that was previously selected before the event was triggered., dynamic oldValue- The value of the item that was previously selected before the event was triggered., dynamic value- The value of the new selected item. |
Changed | event PhoneInputChangedEventHandler | This event is triggered when the selection is changed. | PhoneInputChangedEventArgs |
OnChanging | EventCallback<Event> | This event is triggered on each key up event of the Input, if the value is changed. | dynamic oldValue- The previous value before it was changed., dynamic value- The new value. |
Changing | event PhoneInputChangingEventHandler | This event is triggered on each key up event of the Input, if the value is changed. | PhoneInputChangingEventArgs |
OnItemClick | EventCallback<Event> | This event is triggered when the user clicks on an item from the popup list. | dynamic item- The item that was clicked., string label- The label of the item that was clicked., dynamic value- The value of the item that was clicked. |
ItemClicked | event PhoneInputItemClickedEventHandler | This event is triggered when the user clicks on an item from the popup list. | PhoneInputItemClickedEventArgs |