Skip to content

Bug - DescriptionList - termWidth prop value is not applied #12252

@dvail

Description

@dvail

Describe the problem
The termWidth prop on the <DescriptionList> component does not work after updating from PF5 to PF6.

How do you reproduce the problem?
Visit the docs site and adjust the value of termWidth in the example. The width of the term does not change. https://www.patternfly.org/components/description-list#horizontal-using-custom-term-width-modifier

Expected behavior
Changing the termWidth updates the default size of the term in horizontal description lists.

Is this issue blocking you?
No, we can use the horizontalTermWidthModifier prop as an alternative that avoids this issue.

Screenshots
Not needed, see docs site example above.

Any other information?

I believe the cause of this is a malformed CSS class here: https://github.com/patternfly/patternfly-react/blob/main/packages/react-core/src/components/DescriptionList/DescriptionList.tsx#L9

The correct value should be

- `--${styles.descriptionList}_term-width`
+ `--${styles.descriptionList}__term--width`

as this change fixes the problem when the HTML is manually edited via dev tools on the docs site.


Jira Issue: PF-3634

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

Needs triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions