diff --git a/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/components/ProviderVirtualMachinesList.tsx b/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/components/ProviderVirtualMachinesList.tsx index 3408107b7..904053fda 100644 --- a/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/components/ProviderVirtualMachinesList.tsx +++ b/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/components/ProviderVirtualMachinesList.tsx @@ -1,6 +1,6 @@ import React, { FC, useState } from 'react'; import { RouteComponentProps } from 'react-router-dom'; -import StandardPage from 'src/components/page/StandardPage'; +import { withIdBasedSelection } from 'src/components/page/withSelection'; import { ProviderData } from 'src/modules/Providers/utils'; import { useForkliftTranslation } from 'src/utils/i18n'; @@ -29,6 +29,11 @@ export interface ProviderVirtualMachinesListProps extends RouteComponentProps { pageId: string; } +const PageWithSelection = withIdBasedSelection({ + toId: (item: VmData) => (item.vm.providerType === 'openshift' ? item.vm.uid : item.vm.id), + canSelect: (item: VmData) => !!item, +}); + export const ProviderVirtualMachinesList: FC = ({ obj, loaded, @@ -44,7 +49,7 @@ export const ProviderVirtualMachinesList: FC = const [vmData, loading] = useInventoryVms(obj, loaded, loadError); return ( - +