Sha256: 93825906e9b905518577643d058f200189f5341a47c0d16e2cead10aada0a328
Contents?: true
Size: 529 Bytes
Versions: 435
Compression:
Stored size: 529 Bytes
Contents
import PbEnhancedElement from '../pb_enhanced_element' export default class PbTextarea extends PbEnhancedElement { style: {[key: string]: string} scrollHeight: string 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
435 entries across 435 versions & 1 rubygems