React-Select v5 Bug of 2 elements in SingleValue
See original GitHub issueHello,
This is to report a specific bug only exists in v5. Same code shows differently between these two versions. No matter I do in terms of CSS, I cannot fix it. I currently reverted back to v4.3.1 so don’t have as much concern but unless this bug is fixed, React-Select will be a package that I and many other experiencing same bug cannot upgrade.
SingleValue = (props) => {
return (
<>
<IconButton
onClick={this.favoritePressed}
>
<FavoriteFilled />
</IconButton>
<input
type="text"
/>
</>
);
};
In a nutshell, I have icon for favoriting items listed in input list so user can favorite them. No matter what I do, second item go below first item. I wrap them with DIV and gave whole bunch of CSS properties still no help.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
Error when using two react-select dropdown - how to fix?
Try to verify which elements have the duplicate Id, open your browser and go to inspect element and search in your forms for...
Read more >API - React Select
The statemanager is a utility class that wraps around the base Select and each Select variant to expose inputValue and value as controllable...
Read more >Uncontrolled Components - React
For example, this code accepts a single name in an uncontrolled component: ... In the React rendering lifecycle, the value attribute on form...
Read more >react-select - npm
With React Component ; from 'react-select'; ; value · 'strawberry', ;; class App ; handleChange = ( ; => console.
Read more >react-select-no-emotion/HISTORY.md - UNPKG
62, * [#3216] Fixes bug where clearing with backspace in a single select would ... `css` attribute being wrongly applied to a DOM...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, have you found a fix? I also have the same issue. The
SingleValue
component is not properly displayed anymore in V5. I’ve tried to put it in absolute position, but it hides the value!Here is a basic example:
The ugly rendering:![Screenshot 2022-10-27 at 14 36 31](https://user-images.githubusercontent.com/43271780/198285972-369d787e-dc60-47c3-8755-f5bebb6552df.png)
The
SingleValue
’shello
div is placed haphazardly.@anikolaev Agreed. This has been discussed and is on the roadmap, but also understand this could be a breaking change since the
Input
component has, for whatever reason, simply passed the extra props to the input element. Adding innerProps would standardize this behavior with the other components.Another approach could be to add the tooltip as a wrapper around the children instead of the Input component.