-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Providing DownChevron in components doesn't work #3739
Comments
works for me with const Icon = ({ innerRef, innerProps }) => (
<span role="img" aria-label="Dropdown emoji" ref={innerRef} {...innerProps}>
👇
</span>
);
const components = {
DropdownIndicator: Icon,
};
export default class SingleSelect extends Component {
render() {
return (
<Select
className="basic-single"
classNamePrefix="select"
name="color"
options={colourOptions}
components={components}
/>
);
}
} |
I'd classify this as a bug–see
The reference to DownChevron is hardcoded instead of being pulled out of props
|
The exact same issue also affects |
Unable to replace CrossIcon. |
Hi all, What you want to do here is pass in The docs are correct and show examples, with See working example here (based off @buszmen201's code): https://codesandbox.io/s/react-codesandboxer-example-yxnpz?file=/example.js:129-146 Let me know if I'm missing something! |
Hi @bladey, Also the docs are still wrong, because they list I can live with that if you decide to disregard the PR, just correcting the record. |
Thanks for clarifying @jkbmat, much appreciataed, let me take another look! |
can confirm the exact same happens with |
Hey, |
@yard2010 There's an existing PR that fixes the issue, but there are some changes that need to be made and it looks like the author might not get to them. If you want, you can create another PR with the requested changes and we'll look into merging it. |
try with built in "components" object like this
C.DropdownIndicator update the original element with this component's children Sorry for Icon component, it's mine, it's absolutely custom, it's just an example, so feel free to use any other Icon package like react-icons-kit |
The docs say that
But passing DownChevron in
components
prop doesn't do anything, here's an example https://codesandbox.io/s/react-codesandboxer-example-jvo50.Is it docs wrong or something's broken?
The text was updated successfully, but these errors were encountered: