@expensify/react-native-live-markdown 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -150,6 +150,7 @@ const MarkdownTextInput = React.forwardRef<TextInput, MarkdownTextInputProps>(
150
150
  spellCheck,
151
151
  style = {},
152
152
  value,
153
+ autoFocus = false,
153
154
  },
154
155
  ref,
155
156
  ) => {
@@ -500,6 +501,14 @@ const MarkdownTextInput = React.forwardRef<TextInput, MarkdownTextInputProps>(
500
501
  };
501
502
  }, []);
502
503
 
504
+ useEffect(() => {
505
+ // focus the input on mount if autoFocus is set
506
+ if (!(divRef.current && autoFocus)) {
507
+ return;
508
+ }
509
+ divRef.current.focus();
510
+ }, []);
511
+
503
512
  return (
504
513
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
505
514
  <div