Demo-Page Repository

Home > mui-country-code-selector > CCSelectorProps

CCSelectorProps interface

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.

Represents the props of the CountryCodeSelector components.

Signature:

interface CCSelectorProps extends Omit<AutocompleteProps<CountryType, false, boolean, false>, 'getOptionLabel' | 'onChange' | 'options' | 'renderInput' | 'value'>

Extends: Omit<AutocompleteProps<CountryType, false, boolean, false>, ‘getOptionLabel’ | ‘onChange’ | ‘options’ | ‘renderInput’ | ‘value’>

Properties

Property

Modifiers

Type

Description

getOptionLabel?

((option: CountryType) => string) | undefined

(ALPHA) (Optional) A function for rendering the selected option on underlying AutoComplete component. See https://mui.com/material-ui/api/autocomplete/#autocomplete-prop-getOptionLabel for more information about MUI’s Autocomplete’s getOptionLabel prop.

label?

string

(ALPHA) (Optional) Sets the label string on underlying MUI AutoComplete component’s TextField component.

renderCountRef?

MutableRefObject<number>

(ALPHA) (Optional) Passes a numeric React ref object to the selector component, which is then increased by one every time the component is rendered.

renderInput?

(params: AutocompleteRenderInputParams) => React.ReactNode

(ALPHA) (Optional) A function for rendering the input element, that is passed to the underlying MUI Autocomplete component. See https://mui.com/material-ui/api/autocomplete/#autocomplete-prop-renderInput for more information about MUI’s Autocomplete’s renderInput prop.

shrink?

boolean

(ALPHA) (Optional) A boolean value that specifies whether or not to shrink the selector and phone number input components’ labels. See https://mui.com/material-ui/react-text-field/#shrink for more information.

variant?

TextFieldVariants

(ALPHA) (Optional) Defines which variant of the Autocomplete’s TextField component is used. See https://mui.com/material-ui/react-text-field/#basic-textfield about the TextField’s variants.