Skip to content

Commit

Permalink
webui: disable disk selection while disks are being rescanned
Browse files Browse the repository at this point in the history
  • Loading branch information
KKoukiou committed Aug 17, 2023
1 parent 5376259 commit 9e885eb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ui/webui/src/components/storage/InstallationMethod.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const containEqualDisks = (disks1, disks2) => {
return disks1Str === disks2Str;
};

const LocalDisksSelect = ({ deviceData, diskSelection, idPrefix, setSelectedDisks }) => {
const LocalDisksSelect = ({ deviceData, diskSelection, idPrefix, isRescanningDisks, setSelectedDisks }) => {
const [isOpen, setIsOpen] = useState(false);
const [inputValue, setInputValue] = useState("");
const [focusedItemIndex, setFocusedItemIndex] = useState(null);
Expand Down Expand Up @@ -207,7 +207,7 @@ const LocalDisksSelect = ({ deviceData, diskSelection, idPrefix, setSelectedDisk
onClick={onToggleClick}
innerRef={toggleRef}
isExpanded={isOpen}
isDisabled={diskSelectionInProgress}
isDisabled={diskSelectionInProgress || isRescanningDisks}
className={idPrefix}
>
<TextInputGroup isPlain>
Expand Down Expand Up @@ -339,6 +339,7 @@ const InstallationDestination = ({ deviceData, diskSelection, dispatch, idPrefix
isInline
id={idPrefix + "-rescan-disks"}
variant="link"
isLoading={isRescanningDisks}
icon={<SyncAltIcon />}
onClick={() => {
setIsRescanningDisks(true);
Expand Down Expand Up @@ -369,6 +370,7 @@ const InstallationDestination = ({ deviceData, diskSelection, dispatch, idPrefix
deviceData={deviceData}
diskSelection={diskSelection}
setSelectedDisks={setSelectedDisks}
isRescanningDisks={isRescanningDisks}
/>
);

Expand Down

0 comments on commit 9e885eb

Please sign in to comment.