react-select multi select with remove删除具有相同标签的多个列表项

时间:2020-02-15 12:14:04

标签: reactjs react-select

            <Select
              options={this.state.students}
              isMulti
              name="students"
              className="basic-multi-select"
              maxMenuHeight="100px"
              onChange={this.selectedStudentsHandler}
            />
0: {label: "sumit", value: "sumit", key: "5e205f61b808be03a96212ce"}
1: {label: "Tarun", value: "Tarun", key: "5e22ab772b2dea197dc04046"}
2: {label: "Tarun", value: "Tarun", key: "5e22b2012b2dea197dc04048"

选择Tarun。都删除了“塔伦”号。我想根据密钥删除它们。怎么做?

0 个答案:

没有答案