Founding price: $35, then $99 after 23:59 UTC on 4 November, then $99
Get ProA form with a Discard button that only asks when there are unsaved edits and resets every field after the inline confirmation.
This item has no props to tune. Use the lens above to change theme, density, direction and more.
Use this when a form can be edited and reverted, and you want Discard to be cheap when it is harmless and careful when it is not.
Do not use it when the form autosaves, or leaving the page must be guarded (add a navigation guard, this only covers the Discard button).
This item is part of tealmac UI Pro
The source for this item installs with a Pro licence key. Log in with your key to see the install command, or read the Pro setup page.
| Prop | Type | Required | Description |
|---|---|---|---|
initial | Record<string, string> | required | Saved values by field name. |
onSave | (values: Record<string, string>) => void | Promise<void> | required | - |
The pattern ships with a Testing Library test (inline-confirm-discard-changes.test.tsx) that covers the disabled states, counting changes, resetting, Keep editing and the baseline after saving.