diff --git a/packages/react-core/package.json b/packages/react-core/package.json index 7c206b8a772..d2c11dcc55e 100644 --- a/packages/react-core/package.json +++ b/packages/react-core/package.json @@ -54,7 +54,7 @@ "tslib": "^2.8.1" }, "devDependencies": { - "@patternfly/patternfly": "6.3.0-prerelease.6", + "@patternfly/patternfly": "6.3.0-prerelease.15", "case-anything": "^3.1.2", "css": "^3.0.0", "fs-extra": "^11.3.0" diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json index 53e6bd812f2..7aadd4fe274 100644 --- a/packages/react-docs/package.json +++ b/packages/react-docs/package.json @@ -23,7 +23,7 @@ "test:a11y": "patternfly-a11y --config patternfly-a11y.config" }, "dependencies": { - "@patternfly/patternfly": "6.3.0-prerelease.6", + "@patternfly/patternfly": "6.3.0-prerelease.15", "@patternfly/react-charts": "workspace:^", "@patternfly/react-code-editor": "workspace:^", "@patternfly/react-core": "workspace:^", diff --git a/packages/react-icons/package.json b/packages/react-icons/package.json index fb4297330e8..f4344f66aca 100644 --- a/packages/react-icons/package.json +++ b/packages/react-icons/package.json @@ -33,7 +33,7 @@ "@fortawesome/free-brands-svg-icons": "^5.15.4", "@fortawesome/free-regular-svg-icons": "^5.15.4", "@fortawesome/free-solid-svg-icons": "^5.15.4", - "@patternfly/patternfly": "6.3.0-prerelease.6", + "@patternfly/patternfly": "6.3.0-prerelease.15", "fs-extra": "^11.3.0", "tslib": "^2.8.1" }, diff --git a/packages/react-styles/package.json b/packages/react-styles/package.json index 55334492b0e..54221b76d2a 100644 --- a/packages/react-styles/package.json +++ b/packages/react-styles/package.json @@ -19,7 +19,7 @@ "clean": "rimraf dist css" }, "devDependencies": { - "@patternfly/patternfly": "6.3.0-prerelease.6", + "@patternfly/patternfly": "6.3.0-prerelease.15", "change-case": "^5.4.4", "fs-extra": "^11.3.0" }, diff --git a/packages/react-table/src/components/Table/Tr.tsx b/packages/react-table/src/components/Table/Tr.tsx index 75bb1eb08f1..6e34c5e07b6 100644 --- a/packages/react-table/src/components/Table/Tr.tsx +++ b/packages/react-table/src/components/Table/Tr.tsx @@ -14,10 +14,12 @@ export interface TrProps extends Omit, 'onR innerRef?: React.Ref; /** Flag indicating the Tr is hidden */ isHidden?: boolean; - /** Only applicable to Tr within the Tbody: Makes the row expandable and determines if it's expanded or not. + /** Only applicable to Tr within the Tbody and determines if the expandable row content is expanded or not. * To prevent column widths from responding automatically when expandable rows are toggled, the width prop must also be passed into either the th or td component */ isExpanded?: boolean; + /** Flag to indicate that a row is expandable. Only applicable to a tr that is intended to collapse or expand. */ + isExpandable?: boolean; /** Only applicable to Tr within the Tbody: Whether the row is editable */ isEditable?: boolean; /** Flag which adds hover styles for the clickable table row */ @@ -46,6 +48,7 @@ const TrBase: React.FunctionComponent = ({ children, className, isExpanded, + isExpandable, isEditable, isHidden = false, isClickable = false, @@ -75,7 +78,7 @@ const TrBase: React.FunctionComponent = ({ }; } - const rowIsHidden = isHidden || (isExpanded !== undefined && !isExpanded); + const rowIsHidden = isHidden || (isExpanded !== undefined && !isExpanded && isExpandable); const { registerSelectableRow } = useContext(TableContext); @@ -96,7 +99,7 @@ const TrBase: React.FunctionComponent = ({ className={css( styles.tableTr, className, - isExpanded !== undefined && styles.tableExpandableRow, + isExpandable !== undefined && styles.tableExpandableRow, isExpanded && styles.modifiers.expanded, isEditable && inlineStyles.modifiers.inlineEditable, isClickable && styles.modifiers.clickable, diff --git a/packages/react-table/src/components/Table/__tests__/__snapshots__/RowWrapper.test.tsx.snap b/packages/react-table/src/components/Table/__tests__/__snapshots__/RowWrapper.test.tsx.snap index ffa0f1be9f7..91dbf4b9afa 100644 --- a/packages/react-table/src/components/Table/__tests__/__snapshots__/RowWrapper.test.tsx.snap +++ b/packages/react-table/src/components/Table/__tests__/__snapshots__/RowWrapper.test.tsx.snap @@ -20,7 +20,7 @@ exports[`RowWrapper renders expanded correctly 1`] = ` { id="toggle-compact" name="toggle-compact" /> -
+
- + {repo.details ? ( - + {!childIsFullWidth ?
@@ -152,7 +152,7 @@ export const TableExpandable: React.FunctionComponent = () => { } return (
{ {repo.lastCommit}
: null} {repo.details.detail1 ? ( diff --git a/packages/react-table/src/components/Table/examples/TableNestedTableExpandable.tsx b/packages/react-table/src/components/Table/examples/TableNestedTableExpandable.tsx index b52495fe642..bd254d9d9ae 100644 --- a/packages/react-table/src/components/Table/examples/TableNestedTableExpandable.tsx +++ b/packages/react-table/src/components/Table/examples/TableNestedTableExpandable.tsx @@ -128,7 +128,7 @@ export const TableExpandable: React.FunctionComponent = () => { ]; return ( - +
{repositories.map((repo, rowIndex) => ( - + {repo.nestedComponent ? ( - +
@@ -141,7 +141,7 @@ export const TableExpandable: React.FunctionComponent = () => {
{
{ aria-label="Collapsible table data" > - +
- + - +
{ {serverData.map((server, serverIndex) => (
{ {server?.workspaces} {server?.status?.title}
{server?.details} diff --git a/packages/react-table/src/deprecated/components/Table/__tests__/__snapshots__/Table.test.tsx.snap b/packages/react-table/src/deprecated/components/Table/__tests__/__snapshots__/Table.test.tsx.snap index 96420adbaac..0886bcd0df0 100644 --- a/packages/react-table/src/deprecated/components/Table/__tests__/__snapshots__/Table.test.tsx.snap +++ b/packages/react-table/src/deprecated/components/Table/__tests__/__snapshots__/Table.test.tsx.snap @@ -1602,11 +1602,10 @@ exports[`Table Collapsible nested table 1`] = `