Demo-Page Repository

Home > mui-country-code-selector > CCSelectorState > clearedRerender

CCSelectorState.clearedRerender property

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.

The state variable clearedRerender is used for triggering a rerender of the component after the phone number input has been cleared and the component has lost focus. The rerender is needed for getting the MUI TextField’s label to enlarge back to it’s initial state. It is important that the value is subscribed to in the useCountryCodeStore for it to be able to trigger the rerender. The value is toggled by the blur handler when the input has been cleared and the element loses the focus.

Signature:

clearedRerender: boolean;