Demo-Page Repository

Home > mui-country-code-selector > createDefaultGetOptionLabel

createDefaultGetOptionLabel() function

This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Creates a default function for getting the option label string in the CountryCodeSelector's underlying Autocomplete component. See https://mui.com/material-ui/api/autocomplete/#autocomplete-prop-getOptionLabel for more information about the getOptionLabel prop.

Signature:

export declare function createDefaultGetOptionLabel(elementWidth: number): (option: CountryType) => string;

Parameters

Parameter

Type

Description

elementWidth

number

The width of the selector element.

**Returns:**

(option: CountryType) => string

A function for getting the option label string.