vueuse / vueuse

Collection of essential Vue Composition Utilities for Vue 2 and 3

Home Page:https://vueuse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

useTextareaAutosize: onResize callback fires not only on resize

oleksandr-hyriavets opened this issue · comments

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

actually, useTextareaAutosize only focus on height update. so, the onResize callback need trigger only when textarea height changed!