Replies: 1 comment 3 replies
-
Greetings @thmi-inx , The input component by default is only 2px wide when there is no input so it may not be useful for adding the title attribute there unless you also modify this to fill the length of the ValueContainer (note: This will be fixed in v5). You would likely want to add the title attribute to the ValueContainer itself. const ValueContainer = (props) => {
const innerProps = { ...props.innerProps, title: "Whatever" };
return <components.ValueContainer {...props} innerProps={innerProps} />;
};
const App = (props) => {
return (
<>
<Select options={basicOptions} components={{ ValueContainer }} />
</>
);
}; |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I just want a title to add as a tooltip when there is not label displayed for the dropdown.
There might be an obvious solution, but i am just not able to find it.
The currently implemented solution wraps the react-select in a span with a title-attribute. This can't be right. Not only is it a weird solution but, it adds the title behaviour to the options as well. (At least to the part of the "custom" options that are not defining their own title)
Beta Was this translation helpful? Give feedback.
All reactions