Skip to content

Commit c51d980

Browse files
fix(orchestrator): clear ActiveTextInput when API returns empty string (#2012)
1 parent db4aa2d commit c51d980

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-orchestrator-form-widgets': patch
3+
---
4+
5+
Fix ActiveTextInput not clearing field when API returns empty string

workspaces/orchestrator/plugins/orchestrator-form-widgets/src/widgets/ActiveTextInput.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,8 @@ export const ActiveTextInput: Widget<
129129
defaultValueSelector,
130130
);
131131

132-
// Only override if fetch returns a non-empty value
133-
// This ensures static default remains as fallback when fetch returns empty
134132
if (
135-
fetchedValue &&
133+
typeof fetchedValue === 'string' &&
136134
fetchedValue !== 'null' &&
137135
value !== fetchedValue
138136
) {

0 commit comments

Comments
 (0)