From a20faad431169918899e70b48a198b823cd75c9f Mon Sep 17 00:00:00 2001 From: IvanIhnatsiuk Date: Sun, 10 Nov 2024 17:25:42 +0100 Subject: [PATCH] fix: add button to test ref functionality --- example/src/App.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/example/src/App.tsx b/example/src/App.tsx index d42b873..d0610f2 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -43,6 +43,10 @@ export default function App() { setTextState({ extracted: '', formatted: '' }); }, []); + const onFocusButtonPress = React.useCallback(() => { + inputRef.current?.focus(); + }, []); + return ( extracted value {textState.extracted} @@ -65,6 +69,7 @@ export default function App() { customNotations={charAlphaNumerics} />