Home > mui-country-code-selector > CCSelectorState > setRefs
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.
Sets references to the phone number input DOM element. Adds also some event handlers and initializes the phone number input with the default value when used as an uncontrolled component.
Parameters:
element
- the phone number input DOM element,
inputRef
- a React MutableRef object (this can be used to access the value of the component when used as an uncontrolled component), and
defaultValue
- the default value for the phone number input when used as an uncontrolled component.
Signature:
setRefs: (element: HTMLInputElement | null, inputRef?: MutableRefObject<HTMLInputElement | null> | RefCallback<HTMLInputElement | null>, defaultValue?: string) => void;