diff --git a/src/fireedge/src/client/components/Forms/VNTemplate/CreateForm/Steps/ExtraConfiguration/clusters.js b/src/fireedge/src/client/components/Forms/VNTemplate/CreateForm/Steps/ExtraConfiguration/clusters.js index c3963583ae..e00fe5454d 100644 --- a/src/fireedge/src/client/components/Forms/VNTemplate/CreateForm/Steps/ExtraConfiguration/clusters.js +++ b/src/fireedge/src/client/components/Forms/VNTemplate/CreateForm/Steps/ExtraConfiguration/clusters.js @@ -38,7 +38,10 @@ const ClustersContent = ({ oneConfig, adminGroup }) => { const clusters = useWatch({ name: TAB_PATH }) const selectedRowIds = - clusters?.reduce((res, id) => ({ ...res, [id]: true }), {}) || {} + Array.isArray(clusters) ? + clusters?.reduce((res, id) => ({ ...res, [id]: true }), {}) + : + {[clusters]: true} const handleSelectedRows = (rows) => { const newValue = rows?.map((row) => row.original.ID) || [] diff --git a/src/fireedge/src/client/components/Tables/VNetworkTemplates/actions.js b/src/fireedge/src/client/components/Tables/VNetworkTemplates/actions.js index 2ca055fb13..98579bcd66 100644 --- a/src/fireedge/src/client/components/Tables/VNetworkTemplates/actions.js +++ b/src/fireedge/src/client/components/Tables/VNetworkTemplates/actions.js @@ -254,7 +254,7 @@ const Actions = () => { dialogProps: { title: T.Delete, children: MessageToConfirmAction, - dataCy: `modal-vnet-${VN_TEMPLATE_ACTIONS.DELETE}`, + dataCy: `modal-vnettemplate-${VN_TEMPLATE_ACTIONS.DELETE}`, }, onSubmit: (rows) => async () => { const ids = rows?.map?.(({ original }) => original?.ID) diff --git a/src/fireedge/src/client/components/Tables/VNetworkTemplates/row.js b/src/fireedge/src/client/components/Tables/VNetworkTemplates/row.js index a76a3ab71a..1de9dd83c7 100644 --- a/src/fireedge/src/client/components/Tables/VNetworkTemplates/row.js +++ b/src/fireedge/src/client/components/Tables/VNetworkTemplates/row.js @@ -16,8 +16,8 @@ /* eslint-disable jsdoc/require-jsdoc */ import PropTypes from 'prop-types' -import { User, Group, Lock, Cloud } from 'iconoir-react' import { Typography } from '@mui/material' +import { Cloud, Group, Lock, User } from 'iconoir-react' import { rowStyles } from 'client/components/Tables/styles' @@ -31,7 +31,7 @@ const Row = ({ original, value, ...props }) => { const timeAgo = `registered ${time.toRelative()}` return ( -