aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/ui/shadcn/combobox.tsx9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/ui/shadcn/combobox.tsx b/packages/ui/shadcn/combobox.tsx
index ad70047f..4883ea19 100644
--- a/packages/ui/shadcn/combobox.tsx
+++ b/packages/ui/shadcn/combobox.tsx
@@ -57,8 +57,15 @@ const ComboboxWithCreate: React.FC<ComboboxWithCreateProps> = ({
type="button"
onClick={async () => onSubmit(inputValue)}
variant="link"
+ disabled={inputValue.length === 0}
>
- {createNewMessage} "{inputValue}"
+ {inputValue.length > 0 ? (
+ <>
+ {createNewMessage} "{inputValue}"
+ </>
+ ) : (
+ <>Create a space by typing here</>
+ )}
</Button>
<p>Start by creating a space and adding content to it</p>
</CommandEmpty>