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

Version Path
playbook_ui-12.18.0.pre.alpha.play786multilevelselectimprovements613 app/pb_kits/playbook/pb_textarea/index.tsx
playbook_ui-12.18.0.pre.alpha.PLAY747carddarktokens610 app/pb_kits/playbook/pb_textarea/index.tsx
playbook_ui-12.18.0.pre.alpha.PLAY785typeaheadts608 app/pb_kits/playbook/pb_textarea/index.tsx
playbook_ui-12.18.0.pre.alpha.PLAY785typeaheadts607 app/pb_kits/playbook/pb_textarea/index.tsx
playbook_ui-12.18.0 app/pb_kits/playbook/pb_textarea/index.tsx
playbook_ui-12.17.1 app/pb_kits/playbook/pb_textarea/index.tsx
playbook_ui-12.17.0.pre.alpha.lightboxcurrentPhotoIndex582 app/pb_kits/playbook/pb_textarea/index.tsx
playbook_ui-12.17.0 app/pb_kits/playbook/pb_textarea/index.tsx
playbook_ui-12.16.0.pre.alpha.tooltippositionprop566 app/pb_kits/playbook/pb_textarea/index.tsx
playbook_ui-12.16.0.pre.alpha.PLAY693tooltipwrongbg558 app/pb_kits/playbook/pb_textarea/index.tsx
playbook_ui-12.16.0.pre.alpha.PLAY693tooltipwrongbg547 app/pb_kits/playbook/pb_textarea/index.tsx
playbook_ui-12.16.0.pre.alpha.PLAY693tooltipwrongbg532 app/pb_kits/playbook/pb_textarea/index.tsx
playbook_ui-12.16.0.pre.alpha.lightboxcurrentphotoprop531 app/pb_kits/playbook/pb_textarea/index.tsx
playbook_ui-12.16.0.pre.alpha.tiptaptestingpart1528 app/pb_kits/playbook/pb_textarea/index.tsx
playbook_ui-12.16.0 app/pb_kits/playbook/pb_textarea/index.tsx