textareaAutoResize directive added and applied to textareas.

This commit is contained in:
izerozlu
2019-08-30 17:40:39 +03:00
parent 9e26882b5f
commit 3b285f088f
2 changed files with 16 additions and 4 deletions

View File

@@ -0,0 +1,8 @@
export default {
name: "textareaAutoHeight",
update(element) {
if (element.scrollHeight !== element.clientHeight) {
element.style.minHeight = `${element.scrollHeight}px`;
}
}
}