Skip to content

fix: set data-label to label if not in uiprops#330

Merged
zzacharo merged 2 commits intoinveniosoftware:masterfrom
OliverGeneser:fix-error-banner
Apr 9, 2026
Merged

fix: set data-label to label if not in uiprops#330
zzacharo merged 2 commits intoinveniosoftware:masterfrom
OliverGeneser:fix-error-banner

Conversation

@OliverGeneser
Copy link
Copy Markdown
Contributor

@OliverGeneser OliverGeneser commented Apr 9, 2026

❤️ Thank you for your contribution!

Closes: inveniosoftware/invenio-app-rdm#3411

"severityChecks",
]);

if (typeof label === "string" && !uiProps["data-label"]) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

isn't it this?

Suggested change
if (typeof label === "string" && !uiProps["data-label"]) {
if (typeof label === "string" && "data-label" in uiProps) {

or uiProps.hasOwnProperty("data-label") instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I chose it because it also sets the value when it’s falsy, such as an empty string etc.

@zzacharo zzacharo merged commit 379ac5d into inveniosoftware:master Apr 9, 2026
2 checks passed
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.

deposit-ui: deposit errors in any section besides "Files" show "Unkown section" in error banner

4 participants