Allow `placeholder` to be a node
I would like to allow the placeholder to be a node so I can put an icon. If I have this method in my class
renderPlaceholder() {
return (
<span>
<i className="icon mdi tag" />
Add tags...
</span>
);
}
and call it as a prop like
placeholder={this.renderPlaceholder()}
it works well but I get a React Props warning. I think we should allow this so perhaps we can change the allowable props for placeholder to include node
This seems like a 1-line PR waiting to happen?
Any news on this one?
This issue seemed to be for the v1 react-select.
v2 react-select allows to replace every internal component with a custom one via their Components Framework. An example for the Placeholder component an would be:
const Placeholder = (props) => {
return ( ... );
}; // or a class
<Select
{ ... }
components={{ Placeholder }}
/>