Skip to content

Commit 38138aa

Browse files
committed
feat: add discard button to reset unsaved changes
1 parent 601e009 commit 38138aa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

apps/webapp/app/routes/admin.feature-flags.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,14 @@ export default function AdminFeatureFlagsRoute() {
254254
{saveError && <Callout variant="error">{saveError}</Callout>}
255255

256256
<div className="flex justify-end gap-2">
257+
{isDirty && (
258+
<Button
259+
variant="tertiary/small"
260+
onClick={() => setValues({ ...initialValues })}
261+
>
262+
Discard
263+
</Button>
264+
)}
257265
<Button
258266
variant="primary/small"
259267
onClick={() => setConfirmOpen(true)}

0 commit comments

Comments
 (0)