Is there an existing issue for this?
Description
Stack: React / State Management / Formik (Frontend)
Steps To Reproduce
Implementation Logic:
Trace the Reset Action: Locate the JSONFormWidget logic, specifically the function that handles the resetForm action.
Identify the Flaw: When a form resets, it tries to re-initialize fields based on schema. For arrays, Appsmith likely has a fallback logic that says: "If an array field is initialized, push at least one empty object {} so the user has a row to type in."
The Fix: Add a strict equality/type check during the reset cycle. If the user explicitly set the defaultValue of that specific field to an empty array [], bypass the auto-append logic. Force the local component state to remain [] rather than mutating to [{}]
Public Sample App
No response
Environment
Production
Severity
Low (Cosmetic UI issues)
Issue video log
No response
Version
cloud / self Hosted 1.6.6
Is there an existing issue for this?
Description
Stack: React / State Management / Formik (Frontend)
Steps To Reproduce
Implementation Logic:
Trace the Reset Action: Locate the JSONFormWidget logic, specifically the function that handles the resetForm action.
Identify the Flaw: When a form resets, it tries to re-initialize fields based on schema. For arrays, Appsmith likely has a fallback logic that says: "If an array field is initialized, push at least one empty object {} so the user has a row to type in."
The Fix: Add a strict equality/type check during the reset cycle. If the user explicitly set the defaultValue of that specific field to an empty array [], bypass the auto-append logic. Force the local component state to remain [] rather than mutating to [{}]
Public Sample App
No response
Environment
Production
Severity
Low (Cosmetic UI issues)
Issue video log
No response
Version
cloud / self Hosted 1.6.6