How to use the inferno-extras.findDOMNode function in inferno-extras

To help you get started, we’ve selected a few inferno-extras examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jhsware / inferno-formlib / src / widgets / AutoComplete.js View on Github external
didSelect (value) {
      const field = this.props.adapter.context
      this.setState({
          options: [],
          isOpen: false,
          markAtIndex: undefined
      })
      this.props.onChange(this.props.propName, field.fromString(value))
      
      // Blur focus to emphasize that selection has been done
      findDOMNode(this._inputNode).blur()
    }
github jhsware / inferno-formlib / src / widgets / ListField.js View on Github external
componentDidMount () {
    let domEl = findDOMNode(this)
    domEl.addEventListener('dragstart', this.handleDragStart, false)
    domEl.addEventListener('dragover', this.handleDragOver, false)
    domEl.addEventListener('dragenter', this.handleDragEnter, false)
    domEl.addEventListener('dragleave', this.handleDragLeave, false)
    domEl.addEventListener('dragend', this.handleDragEnd, false)
    domEl.addEventListener('drop', this.handleDrop, false)
    this.listenersAdded = true

    // Because this is a container we set isMounted here instead of getting it from parent
    this.isMounted = true
  }
github jhsware / inferno-bootstrap / src / TabContent.js View on Github external
function animateCrossFadeIn(component, currSize, animationName, callback) {
  const domEl = findDOMNode(component)

  const height = domEl.offsetHeight + 'px'
  const width = domEl.offsetWidth + 'px'

  domEl.style.height = currSize.height
  domEl.style.width = currSize.width

  domEl.classList.add(animationName + '-enter')
  // Trigger reflow
  const tmp = domEl.offsetHeight
  
  
  // 2. Set an animation listener, code at end
  var done = false
  var nrofTransitionsLeft
  const onTransitionEnd = (event) => {
github jhsware / inferno-bootstrap / src / Dropdown.js View on Github external
getContainer() {
    return findDOMNode(this);
  }
github jhsware / inferno-animation / src / CrossFade.js View on Github external
componentWillUnmount () {
    const node = findDOMNode(this)
    this.props.onLeave(node)
    setTimeout(() => animateOnRemove(node, this.props.prefix))
  }
github jhsware / inferno-animation / src / CrossFade.js View on Github external
_animationCheck () {
    if (this.state.active && this.targetSize && this.sourceSize && findDOMNode(this)) {
      animateSizeChange(findDOMNode(this), this.props.prefix, this.sourceSize, this.targetSize)
      this.targetSize = this.sourceSize = undefined
    }
  }
github jhsware / inferno-bootstrap / src / TabContent.js View on Github external
function getContentSize() {
  const domEl = findDOMNode(this)
  return {
    width: domEl.offsetWidth + 'px',
    height: domEl.offsetHeight + 'px'
  }
}
github jhsware / inferno-formlib / src / widgets / ListFieldHelpers.js View on Github external
componentDidMount () {
        if (!this.props.isFirstMount) {
            animateOnAdd(findDOMNode(this), 'InfernoFormlib-ListFieldRow--Animation')
        }
    }
github jhsware / inferno-formlib / src / widgets / ListField.js View on Github external
componentWillUnmount () {
    let domEl = findDOMNode(this)
    domEl.removeEventListener('dragstart', this.handleDragStart, false)
    domEl.removeEventListener('dragover', this.handleDragOver, false)
    domEl.removeEventListener('dragenter', this.handleDragEnter, false)
    domEl.removeEventListener('dragleave', this.handleDragLeave, false)
    domEl.removeEventListener('dragend', this.handleDragEnd, false)
    domEl.removeEventListener('drop', this.handleDrop, false)
  }

inferno-extras

Collection of utilities for InfernoJS

MIT
Latest version published 1 year ago

Package Health Score

68 / 100
Full package analysis