From 0d2735fe0f41215e287eae7bd073620115428faa Mon Sep 17 00:00:00 2001 From: Michal Gold Date: Sun, 10 Mar 2024 16:20:46 +0200 Subject: [PATCH] V2Wizard: fix remove partition funtionallity (HMS-3753) this commit add the remove partition functionlity to file system step --- .../steps/FileSystem/FileSystemConfiguration.tsx | 10 ++++++++-- src/store/wizardSlice.ts | 9 +++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/Components/CreateImageWizardV2/steps/FileSystem/FileSystemConfiguration.tsx b/src/Components/CreateImageWizardV2/steps/FileSystem/FileSystemConfiguration.tsx index ea93ddae..9a1e6162 100644 --- a/src/Components/CreateImageWizardV2/steps/FileSystem/FileSystemConfiguration.tsx +++ b/src/Components/CreateImageWizardV2/steps/FileSystem/FileSystemConfiguration.tsx @@ -26,6 +26,7 @@ import { changePartitionMinSize, changePartitionMountpoint, selectImageTypes, + removePartition, selectPartitions, } from '../../../../store/wizardSlice'; import UsrSubDirectoriesDisabled from '../../UsrSubDirectoriesDisabled'; @@ -163,6 +164,11 @@ const getSuffix = (mountpoint: string) => { const Row = ({ partition }: RowPropTypes) => { const [units, setUnits] = useState('MiB'); + const dispatch = useAppDispatch(); + + const handleRemovePartition = (id: string) => { + dispatch(removePartition(id)); + }; return ( @@ -184,9 +190,9 @@ const Row = ({ partition }: RowPropTypes) => {