Skip to content

Conversation

@ilhan007
Copy link
Contributor

@ilhan007 ilhan007 commented Jul 24, 2025

Enable setting null for the opener property of popover-based components, such as: Popover, ResponsivePopover, Menu, UserMenu and more.

The change is mainly to improve dev experience in React as it's typical to initialize Refs with null (e.g., useRef(null)), not undefined.

Fixes: #11903

Note: With this change, when the opener is null or undefined, and open is set to true, the popover will be displayed in the top-left corner. Alternatively, we can change this behavior - to close the popover and fire close event, but either way, the opener should be fixed. Whether it shows in the top-left (0,0) coordinates or does not show at all, the popover won't work without opener.

@ilhan007 ilhan007 changed the title Feat popover opener null feat(ui5-popover): support setting "null" for opener Jul 25, 2025
Copy link
Contributor

@nnaydenow nnaydenow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 minor comment but it looks good to me

@ilhan007 ilhan007 merged commit 7d012aa into main Aug 4, 2025
12 checks passed
@ilhan007 ilhan007 deleted the feat-popover-opener-null branch August 4, 2025 13:44
@ui5-webcomponents-bot
Copy link
Collaborator

🎉 This PR is included in version v2.13.0 🎉

The release is available on v2.13.0

Your semantic-release bot 📦🚀

nnaydenow pushed a commit that referenced this pull request Aug 18, 2025
Enable setting `null` for the `opener` property of popover-based components, such as: Popover, ResponsivePopover, Menu, UserMenu and more.

The change is mainly to improve dev experience in React as it's typical to initialize [Refs](https://react.dev/reference/react/useRef#manipulating-the-dom-with-a-ref) with `null` (e.g., useRef<T>(null)), not undefined.

Fixes: #11903

**Note:** With this change, when the opener is `null` or `undefined`, and `open` is set to `true`, the popover will be displayed in the top-left corner. Alternatively, we can change this behavior - to `close` the popover and fire `close` event, but either way, the opener should be fixed. Whether it shows in the top-left (0,0) coordinates or does not show at all, the popover won't work without opener.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: allow passing null for opener

4 participants