Skip to content

Commit 62fa199

Browse files
fix(ui): prevent manifest copy from submitting deploy form (kaito-project#277)
Signed-off-by: robert-cronin <robert.owen.cronin@gmail.com>
1 parent d7f4c9e commit 62fa199

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

frontend/src/components/deployments/ManifestViewer.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ const deployedQuery = useDeploymentManifest(
285285
{resources.map((resource, index) => (
286286
<Button
287287
key={`${resource.kind}-${resource.name}`}
288+
type="button"
288289
variant={selectedResourceIndex === index ? 'default' : 'outline'}
289290
size="sm"
290291
className="h-8"
@@ -308,12 +309,12 @@ const deployedQuery = useDeploymentManifest(
308309
</span>
309310
<div className="flex gap-2">
310311
{resources.length > 1 && (
311-
<Button variant="outline" size="sm" onClick={(e) => { e.stopPropagation(); handleCopyAll(); }}>
312+
<Button type="button" variant="outline" size="sm" onClick={(e) => { e.stopPropagation(); handleCopyAll(); }}>
312313
<Copy className="h-4 w-4 mr-1" />
313314
Copy All
314315
</Button>
315316
)}
316-
<Button variant="outline" size="sm" onClick={(e) => { e.stopPropagation(); handleCopy(); }}>
317+
<Button type="button" variant="outline" size="sm" onClick={(e) => { e.stopPropagation(); handleCopy(); }}>
317318
<Copy className="h-4 w-4 mr-1" />
318319
Copy
319320
</Button>

0 commit comments

Comments
 (0)