Deepak
Unable to Reset Form for Object-Type Fields in JSON Schema-Based Form
I am creating a form using a JSON schema with the following structure:
{
"properties": {
"payload": {
"type": "object",
"description": "The base payload structure required to trigger the agent. This is a JSON object.",
"title": "Agent Payload"
},
"inputFieldName": {
"type": "string",
"description": "The key to add dynamically to the payload structure. The value for this key will be input through the chat interface.",
"title": "Additional Field Name",
"placeholder": "Enter the key to include in the payload (e.g., input)"
}
},
"required": ["payload", "inputFieldName"]
}
When I reset the form, the input field for the string type (inputFieldName) resets successfully, but the UI does not reset for the object type (payload). While I can see that the value of the payload field is being cleared programmatically, this change is not reflected in the UI. It appears that the component's internal state is not updating properly for object-type fields.
Has anyone faced a similar issue, or could someone guide me on how to ensure the UI reflects the reset action for object-type fields?
12 replies