diff --git a/web/src/components/core/ControlledPanels.jsx b/web/src/components/core/ControlledPanels.jsx index ff4796f199..6c164607f9 100644 --- a/web/src/components/core/ControlledPanels.jsx +++ b/web/src/components/core/ControlledPanels.jsx @@ -49,9 +49,9 @@ const Options = ({ children, ...props }) => { * @property {React.AriaAttributes["aria-controls"]} controls - A space-separated of one or more ID values * referencing the elements whose contents or presence are controlled by the option. * @property {boolean} isSelected - Whether the option is selected or not. - * @property {Omit, "id" | "aria-controls">} props - Other props for the internal radio input + * @typedef {Omit, "aria-controls">} InputProps * - * @param {React.PropsWithChildren} props + * @param {React.PropsWithChildren} props */ const Option = ({ id, controls, isSelected, children, ...props }) => { return ( diff --git a/web/src/components/storage/DeviceSelectionDialog.jsx b/web/src/components/storage/DeviceSelectionDialog.jsx index c7b5af5e9b..d7889697a9 100644 --- a/web/src/components/storage/DeviceSelectionDialog.jsx +++ b/web/src/components/storage/DeviceSelectionDialog.jsx @@ -19,6 +19,8 @@ * find current contact information at www.suse.com. */ +// @ts-check + import React, { useState } from "react"; import { sprintf } from "sprintf-js"; import { _ } from "~/i18n"; @@ -52,7 +54,7 @@ const Html = ({ children, ...props }) => ( * @param {function} props.onClose - Callback to execute when user closes the dialog * @param {function} props.onConfirm - Callback to execute when user closes the dialog */ -export default function DeviceSelectionDialog({ devices = [], isOpen = true, onClose, onConfirm, ...props }) { +export default function DeviceSelectionDialog({ devices, isOpen, onClose, onConfirm, ...props }) { const [mode, setMode] = useState(SELECT_DISK_ID); const [disks, setDisks] = useState([]); const [vgDevices, setVgDevices] = useState([]); @@ -62,7 +64,7 @@ export default function DeviceSelectionDialog({ devices = [], isOpen = true, onC switch (mode) { case SELECT_DISK_ID: - settings = { lvm: false, vgDevices }; + settings = { lvm: false, devices: disks }; break; case CREATE_LVM_ID: settings = { lvm: true, vgDevices }; @@ -84,9 +86,8 @@ export default function DeviceSelectionDialog({ devices = [], isOpen = true, onC