Skip to content

Commit

Permalink
Fix: Disable "Opprett" when the combobox is empty (#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigridge authored Jul 24, 2024
1 parent e25ffc9 commit 6a5c928
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/components/ComboBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export default function ComboBox({
</p>
</div>
)}
isValidNewOption={() => true}
isValidNewOption={(inputText: string) => inputText.length > 0}
isOptionDisabled={(option) => !!option?.disabled}
/>
);
Expand Down

0 comments on commit 6a5c928

Please sign in to comment.