textareaAutoResize directive added and applied to textareas.
This commit is contained in:
8
directives/textareaAutoHeight.js
Normal file
8
directives/textareaAutoHeight.js
Normal file
@@ -0,0 +1,8 @@
|
||||
export default {
|
||||
name: "textareaAutoHeight",
|
||||
update(element) {
|
||||
if (element.scrollHeight !== element.clientHeight) {
|
||||
element.style.minHeight = `${element.scrollHeight}px`;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user