From ab38ca682e6222ce48136215242d8d88d30cf33e Mon Sep 17 00:00:00 2001 From: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> Date: Mon, 22 Jul 2024 14:06:13 -0400 Subject: [PATCH] HPCC-32277 ECL Watch v9 fix async multiselect onChange fix an issue where after clearing the selected items from an async dropdown, you could not make any new selections Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> --- esp/src/src-react/components/forms/Fields.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp/src/src-react/components/forms/Fields.tsx b/esp/src/src-react/components/forms/Fields.tsx index 10775ffc83e..73986e9b95e 100644 --- a/esp/src/src-react/components/forms/Fields.tsx +++ b/esp/src/src-react/components/forms/Fields.tsx @@ -119,7 +119,7 @@ const AsyncDropdown: React.FunctionComponent = ({ const keys = selectedKey !== "" ? selectedKey.split(valueSeparator) : []; let items = [...selectedItems]; if (keys.length === items.length) return; - if (selectedKeys !== "" && selOptions.length && selectedKey === "") { + if (selectedKeys !== "" && selOptions.length && selectedKey === "" && selectedKeys === items.map(i => i.key).join("|")) { setSelectedItems([]); return; }