Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[framework]: declare when overriding a property does not change the property type #11041

Open
1 task done
tsanislavgatev opened this issue Mar 9, 2025 · 0 comments
Open
1 task done
Labels
bug This issue is a bug in the code Medium Prio TOPIC Core

Comments

@tsanislavgatev
Copy link
Contributor

tsanislavgatev commented Mar 9, 2025

Bug Description

We are extending the ListItem in MenuItem and we also override a property called accessibiltiyAttributes.
We create new type that is with

type MenuItemAccessibilityAttributes = Pick<AccessibilityAttributes, "ariaKeyShortcuts" | "role"> & ListItemAccessibilityAttributes

and we declare it like:

@property({ type: Object })
declare accessibilityAttributes: MenuItemAccessibilityAttributes;

We have an issue that when application developers are using the MenuItem and giving role, validators underline with error, because in our case, the documentation is not updated and the property type is still ListItemAccessibilityAttributes.

Affected Component

No response

Expected Behaviour

A property type can be changed to a type that contains the parent type but adds more properties when extending component.

Isolated Example

No response

Steps to Reproduce

...

Log Output, Stack Trace or Screenshots

No response

Priority

None

UI5 Web Components Version

latest

Browser

Chrome

Operating System

No response

Additional Context

No response

Organization

SAP

Declaration

  • I’m not disclosing any internal or sensitive information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug in the code Medium Prio TOPIC Core
Projects
Development

No branches or pull requests

2 participants