Skip to content

Consider renaming closeOnBlur to closeOnInteractOutside for Menu and Popover to ensure consistency with Modal and Drawer #1018

Open
@cheton

Description

@cheton

PR #1017 fixed an issue where the closeOnOutsideClick option doesn't function correctly when the Drawer is rendered without a backdrop (#987). Consider renaming the closeOnBlur prop to closeOnInteractOutside for both Menu and Popover to maintain consistency in the approach.

Example:

useClickOutside(contentRef, (event) => {
  // Close when clicking outside the content
  if (closeOnInteractOutside) {
    (typeof onClose === 'function') && onClose(event);
  }
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions