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

[BUG] - Table #2517

Open
keroshanpillay opened this issue Mar 14, 2024 · 3 comments · May be fixed by #2718
Open

[BUG] - Table #2517

keroshanpillay opened this issue Mar 14, 2024 · 3 comments · May be fixed by #2718
Labels
🐛 Type: Bug Something isn't working

Comments

@keroshanpillay
Copy link

NextUI Version

2.0.28

Describe the bug

The example provided in the async table loading does not type the item pulled from the API. An interface should be defined as

interface Person {
  name: string;
  height: string;
  mass: string;
  birth_year: string;
}

then you can type
let list = useAsyncList<Person>

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Go to Infinite Pagination
  2. copy the code into a nextjs environment
  3. attempt to run

Expected behavior

The code should have run out-of-the-box (being an example) but it does not. Therefore, we fix

Screenshots or Videos

No response

Operating System Version

maxOS

Browser

Chrome

@keroshanpillay keroshanpillay added the 🐛 Type: Bug Something isn't working label Mar 14, 2024
Copy link

linear bot commented Mar 14, 2024

ENG-506 [BUG] - Table

@wingkwong
Copy link
Member

wingkwong commented Mar 14, 2024

@keroshanpillay Thanks for reporting. However, I'm able to see the type included in the example locally. Somehow the one in production is outdated. @kuri-sun This issues looks like the one you fixed in #2513. Can you also take a look please?

image

@kuri-sun
Copy link
Member

Thanks @wingkwong, you are right. I am going to take a look at this one!
Also, Thanks @keroshanpillay for sharing the solution as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Type: Bug Something isn't working
Projects
None yet
3 participants