Skip to content

Commit 6ebd77d

Browse files
author
Eric Olkowski
committed
Bumped core for animation fix
1 parent c46b0b3 commit 6ebd77d

7 files changed

Lines changed: 34 additions & 32 deletions

File tree

packages/react-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"tslib": "^2.8.1"
5555
},
5656
"devDependencies": {
57-
"@patternfly/patternfly": "6.3.0-prerelease.33",
57+
"@patternfly/patternfly": "6.3.0-prerelease.35",
5858
"case-anything": "^3.1.2",
5959
"css": "^3.0.0",
6060
"fs-extra": "^11.3.0"

packages/react-docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"test:a11y": "patternfly-a11y --config patternfly-a11y.config"
2424
},
2525
"dependencies": {
26-
"@patternfly/patternfly": "6.3.0-prerelease.33",
26+
"@patternfly/patternfly": "6.3.0-prerelease.35",
2727
"@patternfly/react-charts": "workspace:^",
2828
"@patternfly/react-code-editor": "workspace:^",
2929
"@patternfly/react-core": "workspace:^",

packages/react-icons/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@fortawesome/free-brands-svg-icons": "^5.15.4",
3434
"@fortawesome/free-regular-svg-icons": "^5.15.4",
3535
"@fortawesome/free-solid-svg-icons": "^5.15.4",
36-
"@patternfly/patternfly": "6.3.0-prerelease.33",
36+
"@patternfly/patternfly": "6.3.0-prerelease.35",
3737
"fs-extra": "^11.3.0",
3838
"tslib": "^2.8.1"
3939
},

packages/react-styles/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"clean": "rimraf dist css"
2020
},
2121
"devDependencies": {
22-
"@patternfly/patternfly": "6.3.0-prerelease.33",
22+
"@patternfly/patternfly": "6.3.0-prerelease.35",
2323
"change-case": "^5.4.4",
2424
"fs-extra": "^11.3.0"
2525
},

packages/react-table/src/components/Table/Td.tsx

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,25 @@ const TdBase: React.FunctionComponent<TdProps> = ({
197197
: null;
198198

199199
const { hasAnimations } = useContext(TableContext);
200+
const updateAnimationClass = () => {
201+
const ancestorControlRow = (cellRef as React.RefObject<HTMLElement | null>)?.current?.closest(
202+
`.${styles.tableTr}.${styles.tableControlRow}`
203+
);
204+
const isControlRowExpanded = ancestorControlRow.classList.contains(styles.modifiers.expanded);
205+
if (!isControlRowExpanded) {
206+
return;
207+
}
208+
209+
const isCurrentCellExpanded = (cellRef as React.RefObject<HTMLElement | null>)?.current?.classList.contains(
210+
styles.modifiers.expanded
211+
);
212+
if (isCurrentCellExpanded) {
213+
ancestorControlRow.classList.remove(styles.modifiers.noAnimateExpand);
214+
} else {
215+
ancestorControlRow.classList.add(styles.modifiers.noAnimateExpand);
216+
}
217+
};
218+
200219
const internalCompoundOnToggle = (
201220
event: React.MouseEvent,
202221
rowIndex: number,
@@ -205,24 +224,7 @@ const TdBase: React.FunctionComponent<TdProps> = ({
205224
rowData: IRowData,
206225
extraData: IExtraData
207226
) => {
208-
if (hasAnimations) {
209-
const ancestorControlRow = (cellRef as React.RefObject<HTMLElement | null>)?.current?.closest(
210-
`.${styles.tableTr}.${styles.tableControlRow}`
211-
);
212-
const isControlRowExpanded = ancestorControlRow.classList.contains(styles.modifiers.expanded);
213-
const isCurrentCellExpanded = (cellRef as React.RefObject<HTMLElement | null>)?.current?.classList.contains(
214-
styles.modifiers.expanded
215-
);
216-
217-
if (isControlRowExpanded) {
218-
if (isCurrentCellExpanded) {
219-
ancestorControlRow.classList.remove('pf-m-no-animate');
220-
} else {
221-
ancestorControlRow.classList.add('pf-m-no-animate');
222-
}
223-
}
224-
}
225-
227+
hasAnimations && updateAnimationClass();
226228
compoundExpandProp?.onToggle(event, rowIndex, colIndex, isOpen, rowData, extraData);
227229
};
228230

packages/react-tokens/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"devDependencies": {
3232
"@adobe/css-tools": "^4.4.2",
33-
"@patternfly/patternfly": "6.3.0-prerelease.33",
33+
"@patternfly/patternfly": "6.3.0-prerelease.35",
3434
"fs-extra": "^11.3.0"
3535
}
3636
}

yarn.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3639,10 +3639,10 @@ __metadata:
36393639
languageName: node
36403640
linkType: hard
36413641

3642-
"@patternfly/patternfly@npm:6.3.0-prerelease.33":
3643-
version: 6.3.0-prerelease.33
3644-
resolution: "@patternfly/patternfly@npm:6.3.0-prerelease.33"
3645-
checksum: 10c0/36fc724fdfd810e8cb36cfeddf6534469305039f6514dab71b477447de8b408757ffa9d4273702e327f9c0cf7e4fd40c9e92c8ffc9ddd98e013e2ba2d356b0ee
3642+
"@patternfly/patternfly@npm:6.3.0-prerelease.35":
3643+
version: 6.3.0-prerelease.35
3644+
resolution: "@patternfly/patternfly@npm:6.3.0-prerelease.35"
3645+
checksum: 10c0/942c8dcd96b152d77b4ef546596e342eefef43a759b70c89be2287c3c98d5de3154fe023d457635f62bf283f47ef54ed8f448c19684258953bc5c57859021061
36463646
languageName: node
36473647
linkType: hard
36483648

@@ -3740,7 +3740,7 @@ __metadata:
37403740
version: 0.0.0-use.local
37413741
resolution: "@patternfly/react-core@workspace:packages/react-core"
37423742
dependencies:
3743-
"@patternfly/patternfly": "npm:6.3.0-prerelease.33"
3743+
"@patternfly/patternfly": "npm:6.3.0-prerelease.35"
37443744
"@patternfly/react-icons": "workspace:^"
37453745
"@patternfly/react-styles": "workspace:^"
37463746
"@patternfly/react-tokens": "workspace:^"
@@ -3761,7 +3761,7 @@ __metadata:
37613761
resolution: "@patternfly/react-docs@workspace:packages/react-docs"
37623762
dependencies:
37633763
"@patternfly/documentation-framework": "npm:^6.5.20"
3764-
"@patternfly/patternfly": "npm:6.3.0-prerelease.33"
3764+
"@patternfly/patternfly": "npm:6.3.0-prerelease.35"
37653765
"@patternfly/patternfly-a11y": "npm:5.1.0"
37663766
"@patternfly/react-charts": "workspace:^"
37673767
"@patternfly/react-code-editor": "workspace:^"
@@ -3801,7 +3801,7 @@ __metadata:
38013801
"@fortawesome/free-brands-svg-icons": "npm:^5.15.4"
38023802
"@fortawesome/free-regular-svg-icons": "npm:^5.15.4"
38033803
"@fortawesome/free-solid-svg-icons": "npm:^5.15.4"
3804-
"@patternfly/patternfly": "npm:6.3.0-prerelease.33"
3804+
"@patternfly/patternfly": "npm:6.3.0-prerelease.35"
38053805
fs-extra: "npm:^11.3.0"
38063806
tslib: "npm:^2.8.1"
38073807
peerDependencies:
@@ -3885,7 +3885,7 @@ __metadata:
38853885
version: 0.0.0-use.local
38863886
resolution: "@patternfly/react-styles@workspace:packages/react-styles"
38873887
dependencies:
3888-
"@patternfly/patternfly": "npm:6.3.0-prerelease.33"
3888+
"@patternfly/patternfly": "npm:6.3.0-prerelease.35"
38893889
change-case: "npm:^5.4.4"
38903890
fs-extra: "npm:^11.3.0"
38913891
languageName: unknown
@@ -3927,7 +3927,7 @@ __metadata:
39273927
resolution: "@patternfly/react-tokens@workspace:packages/react-tokens"
39283928
dependencies:
39293929
"@adobe/css-tools": "npm:^4.4.2"
3930-
"@patternfly/patternfly": "npm:6.3.0-prerelease.33"
3930+
"@patternfly/patternfly": "npm:6.3.0-prerelease.35"
39313931
fs-extra: "npm:^11.3.0"
39323932
languageName: unknown
39333933
linkType: soft

0 commit comments

Comments
 (0)