diff --git a/src/components/Extensibility/ExtensibilityDetails.js b/src/components/Extensibility/ExtensibilityDetails.js index c3912908c8..073906297b 100644 --- a/src/components/Extensibility/ExtensibilityDetails.js +++ b/src/components/Extensibility/ExtensibilityDetails.js @@ -161,7 +161,7 @@ export const ExtensibilityDetailsCore = ({ : [] } customHealthCards={ - Array.isArray(health) + Array.isArray(health) && health?.length > 0 ? [ (resource, i) => ( { const ExtensibilityInjections = ({ destination, slot, root }) => { const injections = useGetInjections(destination, slot); let itemList = []; - (injections || []).forEach(injection => { + (injections || []).forEach((injection, index) => { itemList.push( - , + , ); }); return itemList; diff --git a/src/shared/ResourceForm/fields/MultiInput.js b/src/shared/ResourceForm/fields/MultiInput.js index a3ddf8d00b..f57291e20a 100644 --- a/src/shared/ResourceForm/fields/MultiInput.js +++ b/src/shared/ResourceForm/fields/MultiInput.js @@ -157,7 +157,7 @@ export function MultiInput({ tooltipContent={sectionTooltipContent || tooltipContent} {...props} > -
+
    {internalValue.map((entry, index) => { const fieldWidth = diff --git a/src/shared/components/ResourceDetails/ResourceDetails.js b/src/shared/components/ResourceDetails/ResourceDetails.js index 8097aae054..c81e1401c5 100644 --- a/src/shared/components/ResourceDetails/ResourceDetails.js +++ b/src/shared/components/ResourceDetails/ResourceDetails.js @@ -67,7 +67,7 @@ ResourceDetails.propTypes = { showYamlTab: PropTypes.bool, layoutCloseCreateUrl: PropTypes.string, layoutNumber: PropTypes.string, - customHealthCards: PropTypes.node, + customHealthCards: PropTypes.arrayOf(PropTypes.func), showHealthCardsTitle: PropTypes.bool, }; @@ -394,9 +394,9 @@ function Resource({ /> ); - const customOverviewCard = (customHealthCards || []).map(healthCard => - healthCard(resource), - ); + const customOverviewCard = ( + customHealthCards || [] + ).map((healthCard, index) => healthCard(resource, index)); return ( diff --git a/src/shared/components/UnsavedMessageBox/UnsavedMessageBox.tsx b/src/shared/components/UnsavedMessageBox/UnsavedMessageBox.tsx index 7cb2900482..c40d2985fc 100644 --- a/src/shared/components/UnsavedMessageBox/UnsavedMessageBox.tsx +++ b/src/shared/components/UnsavedMessageBox/UnsavedMessageBox.tsx @@ -58,8 +58,12 @@ export function UnsavedMessageBox({ isOpen }: UnsavedMessageBoxProps) { onClose={handleClose} titleText={t('common.headers.discard-changes')} actions={[ - , - , + , + , ]} > {t('common.messages.discard-changes-warning')}