function _highlight( direction ) {
    var count = _filteredData.length;

    if ( direction === DIR_NEXT && _index < count - 1 ) {
      _index += 1;
    } else if ( direction === DIR_PREV && _index > -1 ) {
      _index -= 1;
    }

    if ( _index > -1 ) {
      var value = _filteredData[_index].value;
      var item = _optionsDom.querySelector( '[data-option="' + value + '"]' );
      var input = item.querySelector( 'input' );

      _isBlurSkipped = true;
      input.focus();
    } else {
      _isBlurSkipped = false;
      _searchDom.focus();
    }
  }
/**
   * Highlights an option in the list.
   * @param {string} direction Direction to highlight compared to the
   *                           current focus.
   */
Highlights an option in the list.
@param {string} direction Direction to highlight compared to the
current focus.
Highlights an option in the list . @param { string } direction Direction to highlight compared to the current focus .
function _highlight( direction ) {
    var count = _filteredData.length;
    if ( direction === DIR_NEXT && _index < count - 1 ) {
      _index += 1;
    } else if ( direction === DIR_PREV && _index > -1 ) {
      _index -= 1;
    }
    if ( _index > -1 ) {
      var value = _filteredData[_index].value;
      var item = _optionsDom.querySelector( '[data-option="' + value + '"]' );
      var input = item.querySelector( 'input' );
      _isBlurSkipped = true;
      input.focus();
    } else {
      _isBlurSkipped = false;
      _searchDom.focus();
    }
  }
function _highlight ( direction ) { var count = _filteredData . length ; if ( direction === DIR_NEXT && _index < count - 1 ) { _index += 1 ; } else if ( direction === DIR_PREV && _index > - 1 ) { _index -= 1 ; } if ( _index > - 1 ) { var value = _filteredData [ _index ] . value ; var item = _optionsDom . querySelector ( '[data-option="' + value + '"]' ) ; var input = item . querySelector ( 'input' ) ; _isBlurSkipped = true ; input . focus ( ) ; } else { _isBlurSkipped = false ; _searchDom . focus ( ) ; } }
Highlights an option in the list.
Highlights an option in the list .