Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount() {
const {singleSelection, wrapFocus, selectedIndex} = this.props;
this.foundation_ = new MDCListFoundation(this.adapter);
this.foundation_.init();
this.foundation_.setSingleSelection(singleSelection);
if (singleSelection && typeof selectedIndex === 'number' && !isNaN(selectedIndex)) {
this.foundation_.setSelectedIndex(selectedIndex);
}
this.foundation_.setWrapFocus(wrapFocus);
this.foundation_.setVerticalOrientation(this.props[ARIA_ORIENTATION] === VERTICAL);
}