如何用react-select-plus获取高亮项的值?

How to get the value of the highlighted item with react-select-plus?

我正在使用 react-select-plus,当我通过键盘在它们之间导航时,我试图获取突出显示项的值,

我怎样才能使这个工作?

这是我的代码示例:

class App extends Component {
  constructor() {
    super(); 
  }

  loadOptions(input, callback) {
    setTimeout(() => {
      callback(null, {
        options: [
          { value: 'one', label: 'One' },
          { value: 'two', label: 'Two' }
        ], 
        complete: true
      });
    }, 500);
  };

  render() {
    return (
      <div>
        <Async 
          loadOptions={this.loadOptions}  
        />
      </div>
    );
  }
}

希望你能帮助我

我终于找到了如何获取当前突出显示的项目:

class App extends Component {
  constructor() {
    super(); 
  }

  keyUp() {
    let item = ReactDOM.findDOMNode(document.getElementsByClassName('Select-option is-focused')[0]);
    console.log(item.textContent);
  }

  loadOptions(input, callback) {
    setTimeout(() => {
      callback(null, {
        options: [
          { value: 'one', label: 'One' },
          { value: 'two', label: 'Two' }
        ], 
        complete: true
      });
    }, 500);
  };

  render() {
    return (
      <div tabIndex="0" onKeyUp={this.keyUp.bind(this)}>
        <Async 
          loadOptions={this.loadOptions}  
        />
      </div>
    );
  }
}