AutocompleteList hidden by AccordionPanel
See original GitHub issueI’m using the latest version of this library and this is happening.
// Structure
// TagInputAutocomplete renders the autocomplete fields with creeatable
.... really big form ...
<AccordionPanel>
<VStack spacing={4} alignItems="flex-start">
<TagInputAutocomplete
name={`jobs.${index}.jobSkills`}
label="Job skills"
mappedValues={['react', 'node', 'typescript']}
/>
<TagInputAutocomplete
name={`jobs.${index}.jobTools`}
label="Job tools"
mappedValues={[]}
/>
</VStack>
</AccordionPanel>
...
TaginputAutocomplete
import { FormControl, FormLabel } from '@chakra-ui/react'
import {
AutoComplete,
AutoCompleteCreatable,
AutoCompleteInput,
AutoCompleteItem,
AutoCompleteList,
AutoCompleteTag
} from '@choc-ui/chakra-autocomplete'
import { NextPage } from 'next'
import { Controller, FieldPath, useFormContext } from 'react-hook-form'
import { TNewProjectFormData } from '../newProjectForm.zod'
type Props = {
name: FieldPath<TNewProjectFormData>
label: string
mappedValues: string[]
}
const SkillsTagInput: NextPage<Props> = ({ name, label, mappedValues }) => {
const { control } = useFormContext<TNewProjectFormData>()
return (
<Controller
name={name}
control={control}
render={({ field }) => (
<FormControl>
<FormLabel htmlFor={field.name}>{label}</FormLabel>
<AutoComplete openOnFocus multiple creatable onChange={field.onChange}>
<AutoCompleteInput ref={field.ref} id={field.name}>
{({ tags }) =>
tags.map((tag, tid) => (
<AutoCompleteTag key={tid} label={tag.label} onRemove={tag.onRemove} />
))
}
</AutoCompleteInput>
{mappedValues.length > 0 && (
<AutoCompleteList>
{mappedValues.map((value, cid) => (
<AutoCompleteItem
key={`option-${cid}`}
value={value}
textTransform="capitalize"
_selected={{ bg: 'whiteAlpha.50' }}
_focus={{ bg: 'whiteAlpha.100' }}
>
{value}
</AutoCompleteItem>
))}
</AutoCompleteList>
)}
<AutoCompleteCreatable />
</AutoComplete>
</FormControl>
)}
/>
)
}
export default SkillsTagInput
Rendered form
Any suggestion or correction on the component structure will be helpful.
Feature Request
Add an usePortal
prop, similar to chakra-dayzed-datepicker
As seen the calendar component hides anything behind it by using the usePortal
prop
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Issues · anubra266/choc-autocomplete - GitHub
AutoCompleteList fails to display when parent is pre-rendered. #156 opened on Aug 22 by SpencerKaiser ... AutocompleteList hidden by AccordionPanel.
Read more >Constant Field Values (primefaces 3.4 API)
Constant Field Values ; public static final String · INACTIVE_TAB_CONTENT_CLASS, "ui-accordion-content ui-helper-reset ui-widget-content ui-helper-hidden".
Read more >Hiding the first tab of accordion panel in JSF Primefaces
By default the first tab of the primefaces accordion panel is shown open on page load. Is there a way that it can...
Read more >Constant Field Values (PrimeFaces 11.0.0-RC2 API) - javadoc.io
org.primefaces.component.accordionpanel. ... public static final String · CONTAINER_CLASS, "ui-accordion ui-widget ui-helper-reset ui-hidden-container".
Read more >City of Charlotte accessibility audit report
<label> be visually-hidden, ensure that it is still available for screen readers by ... charmeck-accordion-panel-group panel-group" role="tablist" aria-.
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
I was able to get around this by manually implementing a portal, then conditionally rendering the element within the panel based on whether or not it was expanded!
I just had a very similar issue with
Tabs
… when I usedisLazy
it immediately began functioning again and the list started rendering once more. No idea why, but figured that might be meaningful to add the conversation.