Skip to content

Commit

Permalink
Always forward provided onChange (#377)
Browse files Browse the repository at this point in the history
* Always forward provided `onChange`

* add changeset
  • Loading branch information
Andarist committed Jul 1, 2023
1 parent bafd5cc commit 4087205
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/rich-garlics-film.md
@@ -0,0 +1,5 @@
---
'react-textarea-autosize': patch
---

The provided `onChange` will get forwarded again to the underlying `<textarea/>` on the server side.
2 changes: 1 addition & 1 deletion src/index.tsx
Expand Up @@ -103,7 +103,7 @@ const TextareaAutosize: React.ForwardRefRenderFunction<
return <textarea {...props} onChange={handleChange} ref={ref} />;
}

return <textarea {...props} ref={ref} />;
return <textarea {...props} onChange={onChange} ref={ref} />;
};

export default /* #__PURE__ */ React.forwardRef(TextareaAutosize);

0 comments on commit 4087205

Please sign in to comment.