Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private getListProps = (checkboxList?: boolean, radioList?: boolean) => ({
checkboxList: Boolean(checkboxList),
radioList: Boolean(radioList),
handleKeyDown: this.handleKeyDown,
handleClick: this.handleClick,
handleFocus: this.handleFocus,
handleBlur: this.handleBlur,
onDestroy: this.onDestroy,
getClassNamesFromList: this.getListItemClassNames,
getListItemInitialTabIndex: this.getListItemInitialTabIndex,
});
// decreases rerenders
// https://overreacted.io/writing-resilient-components/#dont-stop-the-data-flow-in-rendering
getListPropsMemoized = memoizeOne(this.getListProps);
render() {
const {
/* eslint-disable @typescript-eslint/no-unused-vars */
className,
checkboxList,
radioList,
nonInteractive,
dense,
avatarList,
twoLine,
singleSelection,
role,
selectedIndex,
handleSelect,
wrapFocus,