Giter VIP home page Giter VIP logo

example-async-combobox-options's Introduction

Hey there ๐Ÿ‘‹ I'm Melanie

Blog LinkedIn Twitter

I'm a Software Engineer specializing in front-end JavaScript development.

My pronouns are she/her.

I love all things TypeScript, React, Next.js, but love getting my hands dirty with a bit of everything across the stack.

Currently most interested in expanding my knowledge on more backend-related tasks (databases, caching, auth, etc), hacking on JavaScript-based infrastructure and tooling (bundlers, CLI tools, etc), and maximizing developer productivity.

I live in Portland, Oregon, and in my free time, you can probably find me exploring the city, thrifting, playing video games, or tinkering/contributing to open source.

Stats

Profile Views

Melanie's GitHub stats

Top Langs

example-async-combobox-options's People

Contributors

melanieseltzer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

example-async-combobox-options's Issues

Incompatible with recent cmdk

Mostly for anyone else coming here, the API for cmdk looks like it changed from 0.2.1 to 1.0.0 and it triggers a Uncaught TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) issue. See shadcn-ui/ui#3637 and related issues in shadcn/ui.

Solution is to wrap CommandInput and SearchResults in a CommandList:

diff --git a/components/search.tsx b/components/search.tsx
index e66ab00..9436b54 100644
--- a/components/search.tsx
+++ b/components/search.tsx
@@ -33,17 +33,19 @@ export function Search({ selectedResult, onSelectResult }: SearchProps) {
       shouldFilter={false}
       className="h-auto rounded-lg border border-b-0 shadow-md"
     >
-      <CommandInput
-        value={searchQuery}
-        onValueChange={setSearchQuery}
-        placeholder="Search for product"
-      />
+      <CommandList>
+        <CommandInput
+          value={searchQuery}
+          onValueChange={setSearchQuery}
+          placeholder="Search for product"
+        />

-      <SearchResults
-        query={searchQuery}
-        selectedResult={selectedResult}
-        onSelectResult={handleSelectResult}
-      />
+        <SearchResults
+          query={searchQuery}
+          selectedResult={selectedResult}
+          onSelectResult={handleSelectResult}
+        />
+      </CommandList>
     </Command>
   );
 }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.