Show "No results found" for empty search results in command palette (#5143)

This commit is contained in:
Frank Noirot
2025-01-23 18:49:50 -05:00
committed by GitHub
parent 41b97de3d1
commit 2332338ca1

View File

@ -75,6 +75,7 @@ function CommandComboBox({
autoFocus autoFocus
/> />
</div> </div>
{filteredOptions?.length ? (
<Combobox.Options <Combobox.Options
static static
className="overflow-y-auto max-h-96 cursor-pointer" className="overflow-y-auto max-h-96 cursor-pointer"
@ -103,6 +104,11 @@ function CommandComboBox({
</Combobox.Option> </Combobox.Option>
))} ))}
</Combobox.Options> </Combobox.Options>
) : (
<p className="px-4 pt-2 text-chalkboard-60 dark:text-chalkboard-50">
No results found
</p>
)}
</Combobox> </Combobox>
) )
} }