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] - Autocomplete and Select in Popover is buggy #3132

Closed
Aryan-mor opened this issue May 30, 2024 · 10 comments · Fixed by #3137 or #3240
Closed

[BUG] - Autocomplete and Select in Popover is buggy #3132

Aryan-mor opened this issue May 30, 2024 · 10 comments · Fixed by #3137 or #3240

Comments

@Aryan-mor
Copy link

NextUI Version

2.4.0

Describe the bug

When I use Autocomplete and Select in a Popover and then select an item, the Popover closes, causing me to lose the state of the theme. The Popover should remain open when I choose an item from Autocomplete or Select.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Click on Popover
  2. Click on the Autocomplete inside the Popover
  3. Select an item from the Autocomplete

Expected behavior

After selecting an item from Autocomplete or Select, only that list should close, and the Popover should remain open.

Screenshots or Videos

Recording.2024-05-30.140544.mp4

But it works on V2.3.6
You can see the same actions with NextUi V2.3.6 in this video

Recording.2024-05-30.141745.mp4

Operating System Version

windows

Browser

Edge

Copy link

linear bot commented May 30, 2024

ENG-926 [BUG] - Autocomplete and Select in Popover is buggy

@wingkwong wingkwong self-assigned this May 30, 2024
@sauravhathi
Copy link

sauravhathi commented May 30, 2024

I am facing the similar issue

when I use Select or AutoComplete in a modal

I am not able to select an item using the mouse, and clear is also not working

Version 2.3.6 was working, but after updating to 2.4.0, it is not working. Rolling back to version 2.3.6 also does not work anymore.

@wingkwong
Copy link
Member

Rolling back to version 2.3.6 also does not work anymore.

@sauravhathi you may remove your node_modules and reinstall.

@sauravhathi
Copy link

sauravhathi commented May 30, 2024

@wangly19 i tryed many times but not wokring

When I select items using the mouse, it's not working, but when I try using Enter, it's working.

I prefer if you could try Select or AutoComplete in a modal you'll face same issue in 2.3.6 and 2.4.0

@Aryan-mor
Copy link
Author

@sauravhathi
Did you remove ^ from the start of the version?

@sauravhathi
Copy link

@Aryan-mor
Thanks! It works

@pdevito3
Copy link

pdevito3 commented Jun 4, 2024

yup, just ran into this as well (after banging my head against the wall for a while so thanks for the sanity check with this ticket)

after running through the 2.4 release notes, my best guess of the cause is a regression in this popover PR cc @wingkwong

@wingkwong
Copy link
Member

@pdevito3 yes i'm working on it. sorry for any inconvenience caused.

@pdevito3
Copy link

pdevito3 commented Jun 4, 2024

All good! Appreciate the support and all the contributions 🍻

@laneme
Copy link

laneme commented Jun 6, 2024

When the Select is used inside a modal, I cannot select an item (even the hover effect doesn't show up).
Not sure how much related but i'll drop my drawer component. (i can reproduce it within this drawer.)

import * as Dialog from '@radix-ui/react-dialog'
import { ReactNode } from 'react'
import { cn } from '../../lib/utils/misc'
import { UseDisclosureProps } from '@nextui-org/react'

export default function Drawer(props: {
   trigger: ReactNode
   children: ReactNode
   className?: string
   disclosure?: UseDisclosureProps
}) {
   return (
      <Dialog.Root {...props.disclosure} open={props.disclosure?.isOpen}>
         <Dialog.Trigger asChild>{props.trigger}</Dialog.Trigger>

         <Dialog.Overlay className="!fixed z-30 inset-0 bg-black/40 flex justify-end " />
         <Dialog.Content
            className={cn(
               '!fixed inset-y-0 right-0 h-dvh w-full max-w-4xl p-10 py-12 bg-white z-30 focus:outline-none overflow-y-auto',
               props.className,
            )}
         >
            {props.children}
         </Dialog.Content>
      </Dialog.Root>
   )
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants