Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.setState(state => ({ collapsedKeys: Utils.updatedMultiSelectedKeys(state.collapsedKeys, metaData.key) }));
}
this.setState(state => ({ collapsedKeys: Utils.updatedMultiSelectedKeys(state.collapsedKeys, metaData.key) }));
}
this.setState(state => ({ collapsedKeys: Utils.updatedMultiSelectedKeys(state.collapsedKeys, metaData.key) }));
}
createListItem(itemData) {
return (
= 0}
metaData={{ key: itemData.key }}
onSelect={this.handleItemSelection}
>
);
}
return React.Children.map(children, (child, index) => {
let isSelectable = true;
if (child.props.isSelectable === false) {
isSelectable = false;
}
return React.cloneElement(child, {
isSelectable,
isSelected: this.state.selectedIndex === index,
onClick: Utils.wrappedOnClickForItem(child.props.onClick, this.handleItemSelection, { index }),
onKeyDown: Utils.wrappedOnKeyDownForItem(child.props.onKeyDown, this.handleItemSelection, { index }),
});
});
}
return React.Children.map(children, (child, index) => {
let isSelectable = true;
if (child.props.isSelectable === false) {
isSelectable = false;
}
return React.cloneElement(child, {
isSelectable,
isSelected: this.state.selectedIndex === index,
onClick: Utils.wrappedOnClickForItem(child.props.onClick, this.handleItemSelection, { index }),
onKeyDown: Utils.wrappedOnKeyDownForItem(child.props.onKeyDown, this.handleItemSelection, { index }),
});
});
}
this.setState(state => ({ selectedKeys: Utils.updatedMultiSelectedKeys(state.selectedKeys, metaData.key) }));
}