diff --git a/src/components/Launch/LaunchForm/BlobInput.tsx b/src/components/Launch/LaunchForm/BlobInput.tsx index ea3a38773..4f18dcb26 100644 --- a/src/components/Launch/LaunchForm/BlobInput.tsx +++ b/src/components/Launch/LaunchForm/BlobInput.tsx @@ -37,8 +37,14 @@ const useStyles = makeStyles((theme: Theme) => ({ /** A micro form for entering the values related to a Blob Literal */ export const BlobInput: React.FC = (props) => { const styles = useStyles(); - const { error, label, name, onChange, value: propValue } = props; - const blobValue = isBlobValue(propValue) ? propValue : defaultBlobValue; + const { error, label, name, onChange, value: propValue, typeDefinition } = props; + const dimensionality = typeDefinition?.literalType?.blob?.dimensionality; + const blobValue = isBlobValue(propValue) + ? propValue + : { + uri: '', + dimensionality: dimensionality ?? BlobDimensionality.SINGLE, + }; const hasError = !!error; const helperText = hasError ? error : props.helperText; @@ -102,6 +108,7 @@ export const BlobInput: React.FC = (props) => { id={selectId} value={blobValue.dimensionality} onChange={handleDimensionalityChange} + disabled > Single (File) Multipart (Directory)