From 8c5a71fff64e7640f4e3c5be14b5a12d9b223c28 Mon Sep 17 00:00:00 2001 From: Ryan Vazquez Date: Wed, 10 Feb 2021 11:49:13 -0500 Subject: [PATCH 1/2] clear other field when toggling reason --- plugins/cost-insights/src/forms/AlertDismissForm.tsx | 3 +++ 1 file changed, 3 insertions(+) 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); }; From b33fa4cf4ea29047c85a22d8bdab4b581d902edb Mon Sep 17 00:00:00 2001 From: Ryan Vazquez Date: Wed, 10 Feb 2021 11:54:58 -0500 Subject: [PATCH 2/2] changeset --- .changeset/cost-insights-kind-moons-clap.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/cost-insights-kind-moons-clap.md 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