From 6a5c9288408e96fcab65e48bcb54138a67212d3c Mon Sep 17 00:00:00 2001 From: Sigrid Elnan <55406589+sigridge@users.noreply.github.com> Date: Wed, 24 Jul 2024 11:20:44 +0200 Subject: [PATCH] Fix: Disable "Opprett" when the combobox is empty (#502) --- frontend/src/components/ComboBox.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/ComboBox.tsx b/frontend/src/components/ComboBox.tsx index c0c5bf76..fabdc4b6 100644 --- a/frontend/src/components/ComboBox.tsx +++ b/frontend/src/components/ComboBox.tsx @@ -209,7 +209,7 @@ export default function ComboBox({

)} - isValidNewOption={() => true} + isValidNewOption={(inputText: string) => inputText.length > 0} isOptionDisabled={(option) => !!option?.disabled} /> );