Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import ListOption from 'react-widgets/lib/ListOption'
import ListOptionGroup from 'react-widgets/lib/ListOptionGroup'
import { groupBySortedKeys } from 'react-widgets/lib/util/_'
import * as CustomPropTypes from 'react-widgets/lib/util/PropTypes'
export const virtualListPropTypes = {
itemSizeEstimator: PropTypes.func,
itemSizeGetter: PropTypes.func,
pageSize: PropTypes.number,
threshold: PropTypes.number,
type: PropTypes.oneOf(['simple', 'variable', 'uniform']),
useStaticSize: PropTypes.bool,
useTranslate3d: PropTypes.bool,
hasNextPage: PropTypes.bool,
onRequestItems: PropTypes.func,
loadingComponent: CustomPropTypes.elementType,
}
class VirtualList extends React.Component {
static propTypes = {
...virtualListPropTypes,
data: PropTypes.array,
dataState: PropTypes.object,
onSelect: PropTypes.func,
onMove: PropTypes.func,
activeId: PropTypes.string,
optionComponent: CustomPropTypes.elementType,
renderItem: PropTypes.func,
renderGroup: PropTypes.func,
hasNextPage: PropTypes.bool,
onRequestItems: PropTypes.func,
loadingComponent: CustomPropTypes.elementType,
}
class VirtualList extends React.Component {
static propTypes = {
...virtualListPropTypes,
data: PropTypes.array,
dataState: PropTypes.object,
onSelect: PropTypes.func,
onMove: PropTypes.func,
activeId: PropTypes.string,
optionComponent: CustomPropTypes.elementType,
renderItem: PropTypes.func,
renderGroup: PropTypes.func,
focusedItem: PropTypes.any,
selectedItem: PropTypes.any,
isDisabled: PropTypes.func.isRequired,
valueAccessor: PropTypes.func.isRequired,
textAccessor: PropTypes.func.isRequired,
disabled: CustomPropTypes.disabled.acceptsArray,
messages: PropTypes.shape({
emptyList: CustomPropTypes.message,
}),
}