Skip to content

HiddenContext not exported, can't build my own Popover within a Select field #6453

Closed
@thexpand

Description

@thexpand

Provide your feedback here.

I want to build a select field using the Select component. However, I have my own popover component that I want to use instead of the one from React Aria, but can't because I can't use HiddenContext, as it's not exported but it's required by Select for everything to work properly.

🔦 Context

I want to build a similar logic like this in my own Popover component:

let isHidden = useContext(HiddenContext);
// If we are in a hidden tree, we still need to preserve our children.
if (isHidden) {
let children = props.children;
if (typeof children === 'function') {
children = children({
trigger: props.trigger || null,
placement: 'bottom',
isEntering: false,
isExiting: false,
defaultChildren: null
});
}

Can we just have this context exported, so that we can use it in our own (user land) components if needed?

💻 Code Sample

No response

Version

[email protected]

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge

If other, please specify

No response

What operating system are you using?

macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions