AutoComplete.InputGroup does not respect InputLeftElement
See original GitHub issueimport {
InputGroup,
InputLeftElement,
InputRightElement,
Icon,
} from '@chakra-ui/react';
import {
AutoComplete,
AutoCompleteInput,
AutoCompleteItem,
AutoCompleteList,
AutoCompleteGroup,
AutoCompleteFixedItem,
} from '@choc-ui/chakra-autocomplete';
import { SearchIcon, ChevronRightIcon, ChevronDownIcon } from '@chakra-ui/icons';
const SearchBar = props => {
const options = ['apple', 'appoint', 'zap', 'cap', 'japan'];
return (
<AutoComplete rollNavigation>
{({ isOpen }) => (
<>
<InputGroup>
<InputLeftElement
pointerEvents="none"
children={<SearchIcon />}
/>
<AutoCompleteInput
variant="filled"
placeholder=" Search..."
/>
<InputRightElement
pointerEvents="none"
children={
<Icon as={isOpen ? ChevronRightIcon : ChevronDownIcon} />
}
/>
</InputGroup>
<AutoCompleteList>
{options.map((option, oid) => (
<AutoCompleteItem
key={`optio-${oid}`}
value={option}
textTransform="capitalize"
align="center"
>
{option}
</AutoCompleteItem>
))}
</AutoCompleteList>
</>
)}
</AutoComplete>
);
};
export default SearchBar;
Result is
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
InputLeftElement misalignment when <Input/> size different ...
Description InputLeftElement misalignment when size different from "md" Link ... AutoComplete.InputGroup does not respect InputLeftElement ...
Read more >Bootstrap CSS input group not working expected with Angular ...
You are trying to combine bootstrap style with material by using md-input-container and mdInput inside it. If you keep the input div pure ......
Read more >Disabling Safari AutoFill for a single line address input
How AutoFill should be respected. This problem exists in all browsers. Currently, no browser AutoFill can neatly concatenate multiple address pieces into a ......
Read more >EDGE bug: autocomplete="off" still displays previously ...
EDGE bug - when autocomplete is set to off, information that has been entered is not displayed. edge recently stopped following this rule, ......
Read more >Style and appearance in Blazor AutoComplete Component
.e-outline.e-input-group.e-input-focus:hover:not(.e-success):not(.e-warning) ... You can add the search icon to the AutoComplete component by overriding the ...
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 FreeTop 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
Top GitHub Comments
Hi, honestly after playing around and switching things up a bit it actually seems like the issue is the Input component from chakra itself, I switched to that.
Also, check out the screenshots, look at how the icon overlaps with the placeholder / cursor.
Yea that is happening, I tried to report it. https://github.com/chakra-ui/chakra-ui/issues/4329
If you can help bring it to their attention, it needs to be fixed asap.