Skip to content

Conversation

rebeccaalpert
Copy link
Member

@rebeccaalpert rebeccaalpert commented Sep 30, 2025

Technically this is possible for consumers already - they can import the ouia helper function and create a component in their repo to wrap all PF Dropdowns with if they want to.

This PR adds an optional container with a ouiaId. The container component type can be customized via a prop as well. Container does not render if containerOuiaId is not used so as not to break existing consumers.

Advised filer of issue that he can pass prop popperProps={{appendTo: 'inline'}} to the Dropdown component if he wants Dropdown behavior similar to older versions of PatternFly (inline in DOM). Not addressing that here, but verified that passing that prop places both the toggle and dropdown in the container when the dropdown is open. If inline is not applied, menu will appear at Popper default location, but container will wrap toggle at least.

I am not adjusting the behavior of the dropdown (removal from DOM). I think this would be a breaking change.

What: Closes #11086

Additional issues:

@patternfly-build
Copy link
Contributor

patternfly-build commented Sep 30, 2025

Container component can be customized via a prop as well. Container does not render if containerOuiaId is not used, so as not to break existing consumers.
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.

Bug - Menu/Dropdown - ouiaId is applied to element that does not exist by default, making automation unnecessarily difficult

2 participants