ComponentInstanceForm displays default value in the component form when value is empty.

Created on 4 September 2025, 11 days ago

Overview

When we place any component it displays the default value in the component form.
After we empty default value for any field and save the component and open the component form again it still displays the default value.

Steps to reproduce

- Add one SDC component with optional field in the canvas. (tests/modules/xb_test_sdc/components/my-hero/my-hero.component.yml)
- Empty the default value "view" from the optional field (CTA 1 text)
- Notice that component loads fine.
- Open the component form again and notice that (CTA 1 text) has default value.

Proposed resolution

In buildComponentInstanceForm() method of GeneratedFieldExplicitInputUxComponentSourceBase class, we should ensure that default values are not considered if we have input values as null

User interface changes

N/A

🐛 Bug report
Status

Active

Version

1.0

Component

Component sources

Created by

🇮🇳India mohit_aghera Rajkot

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024