Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
count += 1
const ref = (node) => {
if (node) {
this._menuitems.push(node)
}
}
const props = {
controls: controls,
...child.props.controls, // child 'controls' prop should override parent
disabled: (disabled || child.props.disabled),
onFocus: createChainedFunction(this.handleItemFocus, this.props.onFocus),
onBlur: createChainedFunction(this.handleItemBlur, this.props.onBlur),
onSelect: this.props.onSelect,
onMouseOver: this.handleMenuItemMouseOver
}
const isTabbable = !this.state.hasFocus && count === 1
if (matchComponentTypes(child, [MenuItem])) {
return (
<li>
{safeCloneElement(child, {
...props,
tabIndex: isTabbable ? 0 : -1,
ref,
key: index
})}
</li>
'type',
'messages',
'defaultValue',
'value'
]
const textInputProps = pickProps(this.props, omitProps(TextInput.propTypes, {}, ignoredProps))
const { onChange, onKeyDown, onClick, onBlur } = this.props // eslint-disable-line react/prop-types
return (
<span>
</span>
return child
}
count += 1
const ref = (node) => {
if (node) {
this._menuitems.push(node)
}
}
const props = {
controls: controls,
...child.props.controls, // child 'controls' prop should override parent
disabled: (disabled || child.props.disabled),
onFocus: createChainedFunction(this.handleItemFocus, this.props.onFocus),
onBlur: createChainedFunction(this.handleItemBlur, this.props.onBlur),
onSelect: this.props.onSelect,
onMouseOver: this.handleMenuItemMouseOver
}
const isTabbable = !this.state.hasFocus && count === 1
if (matchComponentTypes(child, [MenuItem])) {
return (
<li>
{safeCloneElement(child, {
...props,
tabIndex: isTabbable ? 0 : -1,
ref,
key: index
})}</li>
'defaultValue',
'value'
]
const textInputProps = pickProps(this.props, omitProps(TextInput.propTypes, {}, ignoredProps))
const { onChange, onKeyDown, onClick, onBlur } = this.props // eslint-disable-line react/prop-types
return (
<span>
</span>
'messages',
'defaultValue',
'value'
]
const textInputProps = pickProps(this.props, omitProps(TextInput.propTypes, {}, ignoredProps))
const { onChange, onKeyDown, onClick, onBlur } = this.props // eslint-disable-line react/prop-types
return (
<span>
</span>
const props = omitProps(this.props, MenuList.propTypes)
return (
<ul title="{title}" aria-disabled="{disabled" aria-expanded="{show}" aria-controls="{controls}" aria-labelledby="{labelledBy}" aria-hidden="{!show}" tabindex="{this.state.hasFocus" role="menu">
{this.renderChildren()}
</ul>
)
}
}
open={this.state.open}
role="region"
>
{this.props.children}
)
if (this.props.transition) {
content = this.renderTransition(content)
}
return (
{content}
)
}
}
render () {
const { children, contentRef, open, onOpen, ...props } = this.props
return (
{
this._content = el
if (typeof contentRef === 'function') contentRef(el)
}}
>
<dialog role="region" open="{this.state.portalOpen">
{this.renderCloseButton()}</dialog>
renderTransition (content) {
return (
{content}
)
}
render () {
const { children, contentRef, open, onOpen, ...props } = this.props
return (
{
this._content = el
if (typeof contentRef === 'function') contentRef(el)
}}