updateSelectedIndexes(value) {
		if (this.props.multiSection) {
			const groups = this.props.titleMap;
			for (let sectionIndex = 0; sectionIndex < groups.length; sectionIndex += 1) {
				const focusedIndex = groups[sectionIndex].suggestions.findIndex(
					item => item.name === value,
				);
				if (focusedIndex > -1) {
					this.setState({
						focusedItemIndex: focusedIndex,
						focusedSectionIndex: sectionIndex,
					});
					break;
				}
			}
		} else {
			const index = this.props.titleMap.findIndex(item => item.name === value);
			this.setState({
				focusedItemIndex: index === -1 ? null : index,
			});
		}
	}
/**
	 * Update the focused item and section given the current value
	 * Managing the two cases (multi section and single section)
	 */
Update the focused item and section given the current value
Managing the two cases (multi section and single section)
Update the focused item and section given the current value Managing the two cases ( multi section and single section )
updateSelectedIndexes(value) {
		if (this.props.multiSection) {
			const groups = this.props.titleMap;
			for (let sectionIndex = 0; sectionIndex < groups.length; sectionIndex += 1) {
				const focusedIndex = groups[sectionIndex].suggestions.findIndex(
					item => item.name === value,
				);
				if (focusedIndex > -1) {
					this.setState({
						focusedItemIndex: focusedIndex,
						focusedSectionIndex: sectionIndex,
					});
					break;
				}
			}
		} else {
			const index = this.props.titleMap.findIndex(item => item.name === value);
			this.setState({
				focusedItemIndex: index === -1 ? null : index,
			});
		}
	}
updateSelectedIndexes ( value ) { if ( this . props . multiSection ) { const groups = this . props . titleMap ; for ( let sectionIndex = 0 ; sectionIndex < groups . length ; sectionIndex += 1 ) { const focusedIndex = groups [ sectionIndex ] . suggestions . findIndex ( item => item . name === value , ) ; if ( focusedIndex > - 1 ) { this . setState ( { focusedItemIndex : focusedIndex , focusedSectionIndex : sectionIndex , } ) ; break ; } } } else { const index = this . props . titleMap . findIndex ( item => item . name === value ) ; this . setState ( { focusedItemIndex : index === - 1 ? null : index , } ) ; } }
Update the focused item and section given the current value
 Managing the two cases (multi section and single section)
Update the focused item and section given the current value Managing the two cases ( multi section and single section )