From 8ab8dcfbfaae3180d19ea2e929a35a045a98ef61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Gra=CC=88=C3=9Fl?= Date: Tue, 7 May 2024 01:28:54 +0200 Subject: [PATCH] fix(InventoryTable): RHINENG-8413 - Bump fec to fix BulkSelect --- package-lock.json | 8 +++---- package.json | 2 +- src/Utilities/hooks/useBulkSelectConfig.js | 26 ++++++++++++---------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 174bf73d1..bd5882cd4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@patternfly/react-core": "^5.2.3", "@patternfly/react-icons": "^5.2.1", "@patternfly/react-table": "^5.2.4", - "@redhat-cloud-services/frontend-components": "^4.2.6", + "@redhat-cloud-services/frontend-components": "^4.2.8", "@redhat-cloud-services/frontend-components-notifications": "^4.1.0", "@redhat-cloud-services/frontend-components-utilities": "^4.0.10", "@redhat-cloud-services/host-inventory-client": "1.2.13", @@ -5555,9 +5555,9 @@ } }, "node_modules/@redhat-cloud-services/frontend-components": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components/-/frontend-components-4.2.6.tgz", - "integrity": "sha512-ErM9sWQUQpKwdKBOQlDBFI6IHyi3mRzTZ3wYJ57pouTzQzOhPozsIpPsPgB2gN/88khenjFEy+7SYuIZDaH5TA==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components/-/frontend-components-4.2.8.tgz", + "integrity": "sha512-h9Zdl8JfS0X4EpUORAue6SR50M8xX0LOKMdnp7L9S34qix47YaJ+SydqloHQkmLhGicv6ZmI6ttbbDbEv0guLA==", "dependencies": { "@patternfly/react-component-groups": "^5.0.0", "@redhat-cloud-services/frontend-components-utilities": "^4.0.0", diff --git a/package.json b/package.json index 1414b0875..65164c5b8 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@patternfly/react-core": "^5.2.3", "@patternfly/react-icons": "^5.2.1", "@patternfly/react-table": "^5.2.4", - "@redhat-cloud-services/frontend-components": "^4.2.6", + "@redhat-cloud-services/frontend-components": "^4.2.8", "@redhat-cloud-services/frontend-components-notifications": "^4.1.0", "@redhat-cloud-services/frontend-components-utilities": "^4.0.10", "@redhat-cloud-services/host-inventory-client": "1.2.13", diff --git a/src/Utilities/hooks/useBulkSelectConfig.js b/src/Utilities/hooks/useBulkSelectConfig.js index c264145b2..ffcf42e0f 100644 --- a/src/Utilities/hooks/useBulkSelectConfig.js +++ b/src/Utilities/hooks/useBulkSelectConfig.js @@ -91,17 +91,19 @@ export const useBulkSelectConfig = ( onSelect: (value) => { onSelectRows(0, value); }, - toggleProps: { - children: isBulkLoading ? ( - [ - - - {`${calculateSelected()} selected`} - , - ] - ) : calculateSelected() > 0 ? ( - {`${calculateSelected()} selected`} - ) : null, - }, + ...(isBulkLoading + ? { + isDisabled: isBulkLoading, + toggleProps: { + children: [ + + +   + {`${calculateSelected()} selected`} + , + ], + }, + } + : {}), }; };