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

HDS-2155 table class fix #1236

Merged
merged 1 commit into from
Mar 6, 2024
Merged

HDS-2155 table class fix #1236

merged 1 commit into from
Mar 6, 2024

Conversation

mrTuomoK
Copy link
Contributor

@mrTuomoK mrTuomoK commented Mar 4, 2024

Description

At the moment all default class names are overridden when using Table component className prop. The reason for this is the {...rest} statement after all the props in the TableContainer component. The className prop is added to the class names to solve this issue. {...rest} is also moved before other props to avoid other default props to be overridden as well.

Related Issue

HDS-2155

Motivation and Context

Motivation for this PR is to support className prop in the Table component. This can be used to add some minor tweaks for the default styles. Other reason for this PR is to avoid unexpected behaviour when using className prop.

How Has This Been Tested?

  • running tests on local machine

Add to changelog

  • Added needed line to changelog

@mrTuomoK mrTuomoK requested a review from a team March 4, 2024 09:01
CHANGELOG.md Outdated
@@ -24,6 +24,7 @@ Changes that are not related to specific components
- Removed old & deprecated individual `lodash` dependencies and replaced with the full package and importing the needed functions only.
- [HeaderActionBarItemWithDropdown] Removed useless `@layer` css style which caused Jest/jsdom tests output errors.
- [Checkbox] Layout issue when using external label with htmlLabelFor-attribute
- [Table] className prop overring the default class
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps: "ClassName prop is appended to HDS classNames instead of overriding all classNames."

Copy link
Contributor

@laurakarhu laurakarhu left a comment

Choose a reason for hiding this comment

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

LGTM

@mrTuomoK mrTuomoK merged commit 860353f into development Mar 6, 2024
6 checks passed
@mrTuomoK mrTuomoK deleted the HDS-2155-table-class-fix branch March 6, 2024 06:56
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.

3 participants