我正在尝试使用react-select来制作一个简单的下拉菜单,其中的值来自于公共API。但是,即使fetch from API看起来工作正常(console.log()显示了所需的数据),下拉选择中也没有选项。但是因为我想使用钩子,所以我必须做一些修改。以下是来自API的数据示例 {"name":"Algeria","code":"DZ","cities":1,"locati
我正在尝试使用react-select进行下拉列表。console.log将我的subjectList数组显示为object object、object、object...如果我不使用react-select,我的dropdown呈现得很好。下面是我的代码:import axios from 'axios';
import Select from 'react-select但是我想尝试使用<e
反应:^15.4.2,反应-选择:^1.0.0-rc.10, import * as React from 'react';// Be sure to include styles at some point, probably during your bootstrapping
import 'react-select/dist/react-select.css'
在可搜索的react select下拉列表中呈现大型数据列表的最佳方式是什么?我研究过窗口,在窗口中,只为在视口中可见的项目创建DOM节点。这可以通过使用react-window包和react-select来完成。然而,我想知道是否有比这更好的方法。这是使用react-window和react-select的窗口实现import ReactDOM from "react-dom";
import S