Javascript 反应选择自定义输入赢得';隐藏占位符
我正在按照React Select文档更改Select的输入组件(要向默认输入添加更多属性,我需要:Javascript 反应选择自定义输入赢得';隐藏占位符,javascript,reactjs,react-select,Javascript,Reactjs,React Select,我正在按照React Select文档更改Select的输入组件(要向默认输入添加更多属性,我需要: const Input = ({ innerProps }) => { return <input {...innerProps} {...somethingElseINeed} />; }; const CustomSelect = props => { return ( <Select components={{ Input }}><
const Input = ({ innerProps }) => {
return <input {...innerProps} {...somethingElseINeed} />;
};
const CustomSelect = props => {
return (
<Select components={{ Input }}></Select>
);
};
const输入=({innerProps})=>{
返回;
};
const CustomSelect=props=>{
返回(
);
};
它确实添加了自定义输入,但是:
getStyled
和theme
属性,但没有成功
知道我遗漏了什么吗?可生产示例?…好的,我通过传递
onChange={props.onChange}
解决了2,但我仍然无法使样式正常工作。getStyles('input',props)
添加了一些东西,但它看起来不像原始输入。