Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Accordion with selectionMode="multiple" Input ctrl-a not working #2055

Closed
eracoding-de opened this issue Nov 27, 2023 · 1 comment · Fixed by #2063
Closed

[BUG] - Accordion with selectionMode="multiple" Input ctrl-a not working #2055

eracoding-de opened this issue Nov 27, 2023 · 1 comment · Fixed by #2063
Labels
🐛 Type: Bug Something isn't working

Comments

@eracoding-de
Copy link

NextUI Version

2.2.9

Describe the bug

If Accordion component is set to selectionMode={"multiple"} and you place an Input component inside as a Accordion Item, you cannot select entire text inside selected input by pressing ctrl-a / cmd-a to select all text inside this Input component.

If mode is not set to multiple, ctrl-a / cmd-a work properly.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

Use this minimal component to reproduce the issue.

  1. Open one of the items
  2. type in some text into input component
  3. try to select all text by shortcut ctrl-a / cmd-a
  4. text is not selected
export default function Example() {
    return (
        <Accordion variant={"splitted"} selectionMode={"multiple"}>
            <AccordionItem key={"1"} title={"1"}>
                <Input/>
            </AccordionItem>
            <AccordionItem key={"2"} title={"2"}>
                <Input/>
            </AccordionItem>
        </Accordion>
    )
}

Expected behavior

Text is selectable by ctrl-a / cmd-a

Screenshots or Videos

No response

Operating System Version

macOS

Browser

Chrome

@eracoding-de eracoding-de added the 🐛 Type: Bug Something isn't working label Nov 27, 2023
@black197
Copy link
Contributor

black197 commented Nov 28, 2023

Here's a workaround. Set state seletionMode to undefined first and set it to "multiple" in useEffect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants