-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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] - Listbox typing issue when using dynamic collections #2365
Comments
and no issue if I don't use ListboxSection , like the example in document - |
hey @Cowjiang, perhaps you have found a solution already? |
Not yet, just add @ts-ignore : ( |
I have the same issue when using
Type '(item: { key: string; title: string; }) => Element' is not assignable to type '(ItemElement<{ key: string; title: string; }> | ItemElement<{ key: string; title: string; }>[] | ItemRenderer<{ key: string; title: string; }>) & ReactNode'. As mentioned in |
NextUI Version
2.2.9
Describe the bug
When I try to use the Listbox & ListboxSection via dynamic collections, typing issue will be reported as below screenshot but rendering without any error.
TS2322: Type (item: ListboxItemBaseProps) => Element is not assignable to type (ItemElement<ListboxItemBaseProps> | ItemElement<ListboxItemBaseProps>[] | ItemRenderer<ListboxItemBaseProps>) & (ReactI18NextChildren | Iterable<...>) Type (item: ListboxItemBaseProps) => Element is not assignable to type ItemRenderer<ListboxItemBaseProps> & string Type (item: ListboxItemBaseProps) => Element is not assignable to type string
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Expected behavior
Nah, please take a look
Screenshots or Videos
No response
Operating System Version
Windows
Browser
Chrome
The text was updated successfully, but these errors were encountered: