Perbaiki ukuran TextArea
resize: none;
Agreeable Alpaca
resize: none;
const textarea = document.getElementById("txt");
textarea.addEventListener("input", function (e) {
this.style.height = "auto";
this.style.height = this.scrollHeight + "px";
});
function autoResize() {
console.log('resizing');
textInput.style.height = (textInput.scrollHeight) + 'px';
}
$('textarea').each(function () {
this.setAttribute('style', 'height:' + (this.scrollHeight) + 'px;overflow-y:hidden;');
}).on('input', function () {
this.style.height = 'auto';
this.style.height = (this.scrollHeight) + 'px';
});