Sha256: 4e70412ac6742f83e4125814f5b77f30dc162c50bf850a6a77a2eca2ca8ea0ec
Contents?: true
Size: 473 Bytes
Versions: 297
Compression:
Stored size: 473 Bytes
Contents
import PbEnhancedElement from '../pb_enhanced_element' export default class PbTextarea extends PbEnhancedElement { static get selector() { return '.resize_auto textarea' } onInput() { this.style.height = 'auto' this.style.height = (this.scrollHeight) + 'px' } connect() { this.element.setAttribute('style', 'height:' + (this.element.scrollHeight) + 'px;overflow-y:hidden;') this.element.addEventListener('input', this.onInput, false) } }
Version data entries
297 entries across 297 versions & 1 rubygems