Open mbagatini opened 1 month ago
did you try to move the Command.Empty
to outside the Command.List
?
@matusca96 yes I tried, but the behaviour didn't change. For now, I had to make this change in order to work properly:
<Command.List>
{isLoading && <Command.Loading>Carregando…</Command.Loading>}
{results?.hits.map((hit) => (
<Command.Item key={hit.id} value={hit.title}>
<h4>{hit.title}</h4>
<span>{hit.overview}</span>
</Command.Item>
))}
{isLoading ? (
<Command.Empty />
) : (
<Command.Empty>Nenhuma opção disponível</Command.Empty>
)}
</Command.List>
I'm facing a problem when working with asyn request options list and search operation. For some reason I could not understand yet, when the records are being fetched, cmdk show both
Empty
andLoading
component at the same time (image below).Is it a bug or am I doing something wrong?
Waiting request to resolve: