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

Popover: Feature: Allow an additional prop to be passed that changes trigger behavior from toggle to always open #3184

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davidrautert
Copy link

Description

Adding a boolean prop that allows the user to change the behavior of the Popover's toggling open. Defaulting to true, if set to false then the Popover Trigger will always pass true to setOpen

Context

When using a Popover in conjunction with a form field, using the field as the trigger would previously result in the Popover toggling, even when the input was focused and the user clicked on it again. The user may want to change their cursor position to edit some text, for instance.

It may be desirable to allow the Popover to remain open so long as the input is being interacted with. It is possible to manage the open state and work around this, but I found that it introduces some additional complexity whereas this is a simple boolean prop.

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

Successfully merging this pull request may close these issues.

1 participant