From 491b08e0448e3e7d69c09b9516c39f50e2f691a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frane=20Poli=C4=87?= <16856471+fPolic@users.noreply.github.com> Date: Mon, 14 Jul 2025 20:32:20 +0200 Subject: [PATCH] fix(dashboard): combobox multiitem clear (#12939) * fix(dashboard): clearing multiitem combobox * chore: changesets --- .changeset/tricky-fishes-grab.md | 5 +++++ .../dashboard/src/components/inputs/combobox/combobox.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/tricky-fishes-grab.md diff --git a/.changeset/tricky-fishes-grab.md b/.changeset/tricky-fishes-grab.md new file mode 100644 index 0000000000..63df048001 --- /dev/null +++ b/.changeset/tricky-fishes-grab.md @@ -0,0 +1,5 @@ +--- +"@medusajs/dashboard": patch +--- + +fix(dashboard): clearing multiitem combobox diff --git a/packages/admin/dashboard/src/components/inputs/combobox/combobox.tsx b/packages/admin/dashboard/src/components/inputs/combobox/combobox.tsx index f1747de7d1..c06cfcc27f 100644 --- a/packages/admin/dashboard/src/components/inputs/combobox/combobox.tsx +++ b/packages/admin/dashboard/src/components/inputs/combobox/combobox.tsx @@ -249,7 +249,7 @@ const ComboboxImpl = ( type="button" onClick={(e) => { e.preventDefault() - handleValueChange(undefined) + handleValueChange(isArrayValue ? ([] as unknown as T) : undefined) }} className="bg-ui-bg-base hover:bg-ui-bg-base-hover txt-compact-small-plus text-ui-fg-subtle focus-within:border-ui-fg-interactive transition-fg absolute left-0.5 top-0.5 z-[1] flex h-[28px] items-center rounded-[4px] border py-[3px] pl-1.5 pr-1 outline-none" >