diff --git a/.changeset/cost-insights-kind-moons-clap.md b/.changeset/cost-insights-kind-moons-clap.md new file mode 100644 index 0000000000..6ab37a353b --- /dev/null +++ b/.changeset/cost-insights-kind-moons-clap.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-cost-insights': patch +--- + +fixes a bug in default dismiss form where other text input persists between reason selections diff --git a/plugins/cost-insights/src/forms/AlertDismissForm.tsx b/plugins/cost-insights/src/forms/AlertDismissForm.tsx index 4271785958..47b4dc80cb 100644 --- a/plugins/cost-insights/src/forms/AlertDismissForm.tsx +++ b/plugins/cost-insights/src/forms/AlertDismissForm.tsx @@ -66,6 +66,9 @@ export const AlertDismissForm = forwardRef< }; const onReasonChange = (_: ChangeEvent, value: string) => { + if (other) { + setOther(null); + } setReason(value as AlertDismissReason); };