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

fix: prevent console errors for read only badges in card actions #76

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nicolethoen
Copy link
Contributor

Console errors were occuring because badges (which are read only) were being passed to the CardHeader via the actions prop. This was triggering the console warning in the Card component.

To prevent this, I avoided the usage of the actions prop. And passed the badges to a div with a hardcoded class and a flex layout to bypass the logic in the card component throwing the error.

admittedly, this is a bandaid and allows the catalog view to avoid this error without requiring a change to the logic of the card component.

@patternfly-build
Copy link

patternfly-build commented Jan 9, 2025

Copy link
Member

@rebeccaalpert rebeccaalpert left a comment

Choose a reason for hiding this comment

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

Looks good to me; just needs a snapshot update.

Copy link
Member

@rebeccaalpert rebeccaalpert left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

LGTM!

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 - 'Clickable only cards should not contain any other actions' when badges included in card title
4 participants