From 42f04297abe0eacc53d2afdcba04e0287ef7ef99 Mon Sep 17 00:00:00 2001 From: aetchego Date: Fri, 29 Nov 2024 18:28:04 +0100 Subject: [PATCH] correct --- src/components/SearchValueSet/ValueSetField.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/SearchValueSet/ValueSetField.tsx b/src/components/SearchValueSet/ValueSetField.tsx index 2bfdf96cb..fda9ee351 100644 --- a/src/components/SearchValueSet/ValueSetField.tsx +++ b/src/components/SearchValueSet/ValueSetField.tsx @@ -22,9 +22,10 @@ const ValueSetField = ({ value, references, placeholder, disabled = false, onSel const [isExtended, setIsExtended] = useState(false) const handleDelete = (node: Hierarchy) => { - const newCodes = value.filter((item) => item.id !== node.id) + const newCodes = value.filter((item) => !(item.id === node.id && item.system === node.system)) onSelect(newCodes) } + return ( <>