如何从 react-semantic-ui 中的多个搜索选择下拉框中获取值?

How to get the values from a Multiple Search Selection dropdown box in react-semantic-ui?

如果这是一个愚蠢的问题,我深表歉意,但我不知道如何使用语义-ui-React 组件从多个搜索选择下拉框中获取值。我已经让它在其中呈现正确的项目并且 selecting 和搜索工作正常,但我似乎无法弄清楚如何从用户 selected 中获取值。

https://react.semantic-ui.com/modules/dropdown/#types-multiple-selection

谢谢

编辑:

代码:

import React from 'react'
import { Dropdown } from 'semantic-ui-react'

const wbcOptions = [
    {
        key:1,
        text: 'Normal',
        value: 'Normal'
    },
    {
        key:2,
        text: 'PLT Clumping',
        value: 'PLT Clumping
    },
    {
        key:3,
        text: 'Reactive Lymphocytes',
        value: 'Reactive Lymphocytes'
    },
    {
        key:4,
        text: 'Hypersegmented Neutrophils',
        value: 'Hypersegmented Neutrophils'
    }
]


const DropdownWBC = (props) => (
  <Dropdown
    placeholder='WBC Abnormalities'
    fluid
    multiple
    search
    selection
    options={wbcOptions}
    onChange={props.handleSelectChange} //Is this where I would pass onChange method??
  />
)

export default DropdownWBC

所以我在我的 App.js 文件中创建了一个名为 'handleSelectChange' 的函数,并将其作为 props 传递给这个 (DropdownWBC) 组件。我如何从多个 select 保管箱 sementic-react 组件获取值并将其传递给我的 App.js 组件以便我可以使用其值设置状态?

我想这就是你想要做的。请检查下面的代码。

// By using this "onchange" handler you can access the values selected by the user.
const handleChange = (e, {value}) => {
  console.log(value)
}

const DropdownExampleMultipleSelection = () => (
  <Dropdown placeholder='Skills' onChange={handleChange.bind(this)} fluid multiple 
    selection options={options} />
)