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

useComboBox throws an error when custom popover is used #5274

Open
orest22 opened this issue Oct 19, 2023 · 1 comment
Open

useComboBox throws an error when custom popover is used #5274

orest22 opened this issue Oct 19, 2023 · 1 comment

Comments

@orest22
Copy link

orest22 commented Oct 19, 2023

Provide a general summary of the issue here

I am trying to use useCombobox with custom Popover and it throws an error when running this ariaHideOutside. The Popover ref becomes available later, so it make sense to validate if all refs are available.

When enabling strict mode in TS it definitely hints that ariaHideOutside wants all elements to be available
Screenshot 2023-10-19 at 11 29 25 AM

🤔 Expected Behavior?

useCombobox don't throw an error and runs ariaHideOutside once refs become available.

😯 Current Behavior

It throws an error:

Screenshot 2023-10-19 at 12 53 07 PM

💁 Possible Solution

Validate if refs together with the state.open.

🔦 Context

No response

🖥️ Steps to Reproduce

https://codesandbox.io/s/aria-mui-popover-forked-cyh3xq?file=/src/MuiAutocomplete.tsx

Version

latest

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

Mac OS

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

@orest22 orest22 changed the title useCombobox throws an error when custom popover is used useComboBox throws an error when custom popover is used Oct 19, 2023
@snowystinger
Copy link
Member

Possibly fixed in #6761 will check after merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✏️ To Groom
Development

Successfully merging a pull request may close this issue.

2 participants