-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improve internal demo mode #3143
Conversation
This still disabled `inert` and focus stealing code. But it does allow outside click.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Before this, once you start interacting with the `Combobox`, the options weren't properly scrolled into view.
76bb216
to
0b931f2
Compare
|
||
/* We can turn off demo mode once we re-open the `Popover` */ | ||
if (nextState.popoverState === PopoverStates.Open) { | ||
nextState.__demoMode = false | ||
} | ||
|
||
return nextState |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can always turn off demo mode 👍
if (!data.virtual) return | ||
if (!data.__demoMode) return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These conditions were incorrect. We don't want to scroll into view when virtual mode is used or when demo mode is used.
This PR improves the internal demo modes for the following components:
Dialog
Combobox
Menu
Popover
This PR also adds a demo mode for the
Listbox
component.