【发布时间】:2019-07-03 10:24:43
【问题描述】:
在我自己的示例中,我正在努力实现一个带有材料 ui 的 react-select 版本。文档中给出的示例非常复杂。 https://material-ui.com/components/autocomplete/
当我尝试复制代码时出现以下错误
ERROR in [at-loader] ./src/public/components/select.tsx:13:37
TS2307: Cannot find module 'react-select/lib/components/containers'.
对于以下依赖项。
import { ValueContainerProps } from "react-select/lib/components/containers";
import { ControlProps } from "react-select/lib/components/Control";
import { MenuProps, NoticeProps } from "react-select/lib/components/Menu";
import { MultiValueProps } from "react-select/lib/components/MultiValue";
import { OptionProps } from "react-select/lib/components/Option";
import { PlaceholderProps } from "react-select/lib/components/Placeholder";
import { SingleValueProps } from "react-select/lib/components/SingleValue";
import { ValueType } from "react-select/lib/types";
我已经安装了 @types/react-select 和 react-select。
【问题讨论】:
标签: reactjs material-ui react-select