useTextareaAutosize: onResize callback fires not only on resize
oleksandr-hyriavets opened this issue · comments
Oleksandr Hyriavets commented
Clear and concise description of the problem
useTextareaAutosize has the option onResize. First of all, it is undocumented, so it's probably worth it to add it to the docs.
Then, it is called on every change of the input and textarea.
Suggested solution
- add the onResize callback to docs
- call it only when size actually changes
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
huiliangShen commented
actually, useTextareaAutosize
only focus on height
update. so, the onResize
callback need trigger only when textarea height changed!