We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8109771 commit 858c229Copy full SHA for 858c229
src/index.tsx
@@ -52,7 +52,7 @@ export default React.forwardRef<HTMLTextAreaElement, TextareaCodeEditorProps>((p
52
const [value, setValue] = useState(props.value || '');
53
useEffect(() => setValue(props.value || ''), [props.value]);
54
const textRef = useRef<HTMLTextAreaElement>(null);
55
- useImperativeHandle<HTMLTextAreaElement, HTMLTextAreaElement>(ref, () => textRef.current!);
+ useImperativeHandle<HTMLTextAreaElement, HTMLTextAreaElement>(ref, () => textRef.current!, [textRef]);
56
57
const contentStyle = {
58
paddingTop: padding,
0 commit comments