Created
August 3, 2021 16:42
-
-
Save nickrouty/eb0afb434ca070ec0dd5428768125200 to your computer and use it in GitHub Desktop.
How to retrieve the native element underlying an IonInput component in React
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const passwordInput = useRef<HTMLIonInputElement>(null); | |
passwordInput.current?.getInputElement().then( (element) => { | |
if ( element.value ) { | |
setPassword(element.value); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment