Skip to content

Commit

Permalink
chore[TextInput]: fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
pac-guerreiro committed Aug 4, 2023
1 parent 1165bea commit 1659c4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-native-web/src/exports/TextInput/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ const TextInput: React.AbstractComponent<

const dimensions = React.useRef({ height: null, width: null });
const hostRef = React.useRef(null);
const prevSelection = React.useRef({ start: 0, end: 0 });
const prevSelection = React.useRef(null);
const prevSecureTextEntry = React.useRef(false);

React.useEffect(() => {
if (hostRef.current) {
if (hostRef.current && prevSelection.current) {
setSelection(hostRef.current, prevSelection.current);
}
prevSecureTextEntry.current = secureTextEntry;
Expand Down

0 comments on commit 1659c4d

Please sign in to comment.