SAP / ui5-webcomponents-react

A wrapper implementation for React of the UI5 Web Components that are compliant with the SAP Fiori User Experience
https://sap.github.io/ui5-webcomponents-react/
Apache License 2.0
435 stars 97 forks source link

[MessageBox]: onClose is an optional prop but gets called either way #6215

Closed f16r closed 4 weeks ago

f16r commented 1 month ago

Describe the bug

Interface is defined as such: image https://github.com/SAP/ui5-webcomponents-react/blob/main/packages/main/src/components/MessageBox/index.tsx#L94

But code does not handle undefined case: image https://github.com/SAP/ui5-webcomponents-react/blob/main/packages/main/src/components/MessageBox/index.tsx#L194

Leads to "onClose is not a function" error

Isolated Example

No response

Reproduction steps

No response

Expected Behaviour

if (onClose != null) { onClose() }

Screenshots or Videos

No response

UI5 Web Components for React Version

latest v1

UI5 Web Components Version

latest v1

Browser

Chrome

Operating System

No response

Additional Context

No response

Relevant log output

No response

Organization

CBC

Declaration

ui5-webcomponents-react-bot commented 3 weeks ago

:tada: This issue has been resolved in version v2.0.0-rc.3 :tada:

The release is available on v2.0.0-rc.3

Your semantic-release bot :package::rocket:

ui5-webcomponents-react-bot commented 3 weeks ago

:tada: This issue has been resolved in version v1.29.9 :tada:

The release is available on v1.29.9

Your semantic-release bot :package::rocket: