fix: allow user override of internal ThProps#596
fix: allow user override of internal ThProps#596nicolethoen merged 2 commits intopatternfly:mainfrom
Conversation
| ref={thRef} | ||
| modifier="truncate" | ||
| className={dataViewThClassName} | ||
| style={width > 0 ? { minWidth: width, ...thProps?.style } : thProps?.style} |
There was a problem hiding this comment.
I assume the minWidth here is important for the resizing feature. Is it possible that someone could inadvertently break the resize feature if they set thProps?.style? maybe the minWidth should be after the spreading of thProps.style so that the resize feature will keep working?
There was a problem hiding this comment.
I was debating that when I was reordering other props, and I'll go ahead and swap the order because the resize would break since a style prop would always override the internal minWidth. It should be uncommon for a user to directly modify minWidth via style since there are two width options in the props they can modify.
|
🎉 This PR is included in version 6.4.0-prerelease.12 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Closes #576.
Allows user set
modifier,className,styleprops which were being ignored.Cleans up some prop descriptions for resizable props.
I was unable to reproduce the issue where
widthprops were being ignored, both the th props:widthand resizableProps:widthfunction normally.