Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
fix(one): 修复 Textarea 使用 autoHeight 后发获取 ref 的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
yesmeck committed Nov 20, 2020
1 parent f865445 commit f64fe77
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const Textarea: React.ForwardRefRenderFunction<any, TextareaWebProps> = (props,
const textareaClassName = clsx('remax-textarea', className, placeholderStyleClassName);

if (autoHeight) {
return <TextareaAutoSize {...restProps} className={textareaClassName} onKeyPress={handleKeyPress} />;
return <TextareaAutoSize {...restProps} className={textareaClassName} ref={ref} onKeyPress={handleKeyPress} />;
}

return <textarea {...restProps} className={textareaClassName} ref={ref} onKeyPress={handleKeyPress} />;
Expand Down

1 comment on commit f64fe77

@vercel
Copy link

@vercel vercel bot commented on f64fe77 Nov 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.