Home > mui-country-code-selector > CCSelectorState > handleValueChange
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.
Handles changes to the value prop. This should be called from a useEffect hook in the component’s body.
When the component is used as a controlled component the value of the phone number input element can be set (is controlled) from the outside. If the value is changed directly (in contrast to changing it in the onChange() handler function), this change must be handled using the handlePhoneNumberChange() function so that the change is also taken into account in the country code selector’s value.
Parameters:
value
- The value prop of a controlled component.
Signature:
handleValueChange: (value: string | null | undefined) => void;