From bc1ed880a610891e5057ab838397a1621912fefe Mon Sep 17 00:00:00 2001 From: fichtnerma <72387685+fichtnerma@users.noreply.github.com> Date: Tue, 17 Sep 2024 15:08:20 +0200 Subject: [PATCH] FinalFormSelect: Fix value `0` and `false` not being clearable (#2523) Fix bug that made the number 0 unclearable when used as a value inside a SelectField. --------- Co-authored-by: Markus Fichtner Co-authored-by: Ricky James Smith --- .changeset/six-vans-hang.md | 5 +++++ packages/admin/admin/src/form/FinalFormSelect.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/six-vans-hang.md diff --git a/.changeset/six-vans-hang.md b/.changeset/six-vans-hang.md new file mode 100644 index 0000000000..56b5dcd8d7 --- /dev/null +++ b/.changeset/six-vans-hang.md @@ -0,0 +1,5 @@ +--- +"@comet/admin": patch +--- + +FinalFormSelect: Fix value `0` and `false` not being clearable diff --git a/packages/admin/admin/src/form/FinalFormSelect.tsx b/packages/admin/admin/src/form/FinalFormSelect.tsx index aaef03478c..8938e88a4b 100644 --- a/packages/admin/admin/src/form/FinalFormSelect.tsx +++ b/packages/admin/admin/src/form/FinalFormSelect.tsx @@ -47,7 +47,7 @@ export const FinalFormSelect = ({ const endAdornment = !required ? ( onChange(multiple ? [] : undefined)} /> ) : null;