Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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()
}
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
}
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) => {
getContainer() {
return findDOMNode(this);
}
componentWillUnmount () {
const node = findDOMNode(this)
this.props.onLeave(node)
setTimeout(() => animateOnRemove(node, this.props.prefix))
}
_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
}
}
function getContentSize() {
const domEl = findDOMNode(this)
return {
width: domEl.offsetWidth + 'px',
height: domEl.offsetHeight + 'px'
}
}
componentDidMount () {
if (!this.props.isFirstMount) {
animateOnAdd(findDOMNode(this), 'InfernoFormlib-ListFieldRow--Animation')
}
}
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)
}