Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select component raises collection.findMany is not a function error #3306

Closed
1 of 3 tasks
lukerollans opened this issue Feb 16, 2025 · 1 comment
Closed
1 of 3 tasks
Labels

Comments

@lukerollans
Copy link

Description

When I attempted to use Ark's Select component for the first time, after copy + pasting the basic example from the docs, I encounter an error describing collection.findMany is not a function

It appears as though the ListCollection returned by createListCollection does not provide a findMany property, or any of the other properties apart from options and items. I'm not sure why.

Link to Reproduction (or Detailed Explanation)

https://stackblitz.com/edit/github-2bvq5ryy?file=src%2Fapp%2Fselect%2Fpage.tsx

Steps to Reproduce

  1. Start from the Nextjs Quickstart example provided on the Getting Started page
  2. Navigate to the Select component documentation and copy + paste in the most basic (or any) example
  3. Add the named export Basic component to any page in the app
  4. Visit the relevant page
  5. See error

Ark UI Version

4.9.1

Framework

  • React
  • Solid
  • Vue

Browser

Arc

Additional Information

Image

@lukerollans lukerollans changed the title Select component raises collection.findMany is not a function error Select component raises collection.findMany is not a function error Feb 16, 2025
@segunadebayo
Copy link
Member

Please add “use client” to the top of the file.

Unfortunately, it’s an RSC compiler limitation. It can’t understand custom class instances that use “this”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants