diff --git a/src-web/components/responseViewers/MultipartViewer.tsx b/src-web/components/responseViewers/MultipartViewer.tsx index 354d1a62..cceaec2c 100644 --- a/src-web/components/responseViewers/MultipartViewer.tsx +++ b/src-web/components/responseViewers/MultipartViewer.tsx @@ -56,10 +56,10 @@ export function MultipartViewer({ data, boundary, idPrefix = 'multipart' }: Prop addBorders label="Multipart" layout="horizontal" - tabListClassName="border-r border-r-border" - tabs={parts.map((part) => ({ + tabListClassName="border-r border-r-border -ml-3" + tabs={parts.map((part, i) => ({ label: part.name ?? '', - value: part.name ?? '', + value: tabValue(part, i), rightSlot: part.filename && part.headers.contentType.mediaType?.startsWith('image/') ? (
@@ -77,7 +77,7 @@ export function MultipartViewer({ data, boundary, idPrefix = 'multipart' }: Prop @@ -115,7 +115,7 @@ function Part({ part }: { part: MultipartPart }) { } if (mimeType?.match(/csv|tab-separated/i)) { - return ; + return ; } if (mimeType?.match(/^text\/html/i) || detectedLanguage === 'html') { @@ -132,3 +132,7 @@ function Part({ part }: { part: MultipartPart }) { return ; } + +function tabValue(part: MultipartPart, i: number) { + return `${part.name ?? ''}::${i}`; +}