You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inside a controlled accordion, any inputs require 2 clicks to become focused and to enter any text there.
It starts working if you click anywhere inside the accordion item.
If the item is controlled but initially collapsed, it works too, because to expand it, you actually have to click on the item, and it works then.
I tried checking some events propagation on the accordion or on the item, it didn't help.
I expect the input field to become focused from the 1st click
Minimal reproducible code (same as on StackBlitz)
import{useState}from'react';import{Accordion,AccordionItem,Input}from'@heroui/react';exportdefaultfunctionApp(){const[selectedKeys]=useState(['1']);return(<AccordionselectedKeys={selectedKeys}><AccordionItemkey="1"aria-label="Controlled accordion"subtitle="See below. This item is initially expanded"title="Controlled accordion"><Inputlabel="Requires 2 clicks to input"/></AccordionItem></Accordion>);}
Operating System Version
macOS
Browser
Chrome, Safari and WebViews
The text was updated successfully, but these errors were encountered:
@wingkwong yeah, you're right, I likely forgot to save the sandbox after edits — now fixed.
The code snippet here in the original message was correct though.
HeroUI Version
2.7.4
Describe the bug
Inside a controlled accordion, any inputs require 2 clicks to become focused and to enter any text there.
It starts working if you click anywhere inside the accordion item.
If the item is controlled but initially collapsed, it works too, because to expand it, you actually have to click on the item, and it works then.
I tried checking some events propagation on the accordion or on the item, it didn't help.
Your Example Website or App
https://stackblitz.com/edit/qtnjgugf?file=App.jsx
Steps to Reproduce the Bug or Issue
Expected behavior
I expect the input field to become focused from the 1st click
Minimal reproducible code (same as on StackBlitz)
Operating System Version
macOS
Browser
Chrome, Safari and WebViews
The text was updated successfully, but these errors were encountered: