Comments (4)
and no issue if I don't use ListboxSection , like the example in document - Listbox -> ListboxItem
the issue only produce on Listbox -> ListboxSection -> ListboxItem
from nextui.
hey @Cowjiang, perhaps you have found a solution already?
from nextui.
hey @Cowjiang, perhaps you have found a solution already?
Not yet, just add @ts-ignore : (
from nextui.
I have the same issue when using ListboxSection
with dynamic items.
<Listbox aria-label='Page selection' > <ListboxSection items={items}> {(item) => ( <ListboxItem key={item.key} > {item.title} </ListboxItem> )} </ListboxSection> </Listbox>
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'.
Type '(item: { key: string; title: string; }) => Element' is not assignable to type 'ItemRenderer<{ key: string; title: string; }> & string'.
Type '(item: { key: string; title: string; }) => Element' is not assignable to type 'string'.ts(2322)
As mentioned in ListboxSection
document, children
prop accepts ReactNode, so I changed the code to this and the error is gone:
<Listbox aria-label='Page selection' > <ListboxSection> {items.map((item) => ( <ListboxItem key={item.key} > {item.title} </ListboxItem> ))} </ListboxSection> </Listbox>
from nextui.
Related Issues (20)
- [BUG] - If a Table is inserted into the Modal pop-up window, it cannot be scrolled left or right, and the overflow x-scroll property is invalid. HOT 13
- [BUG] - links do not work in nextui cli vite starter template HOT 2
- [BUG] - Tabs component not working HOT 4
- [BUG] - DEFAULT requied and email validation is not working on latest version HOT 2
- [BUG] - Project created via `nextui init` fails to `yarn build` HOT 2
- [BUG] - Cannot Change Value after select item in Autocomplete HOT 2
- [BUG] - Skeleton animation is superimposed on other elements HOT 1
- [BUG] - Not working use pnpm monorepo. HOT 5
- [BUG] - does the next-ui doc have something error of the classNames type descripition? HOT 3
- [BUG] - DropdownItem routing don't work as expected HOT 7
- [BUG] - When using the Button component on mobile devices, the first onPress event is ignored HOT 3
- [BUG] - Activating a Modal within the NavbarMenuItem event prevents sliding in any direction on elements within the Modal. HOT 1
- [BUG] - Select style suddenly not working. HOT 3
- [BUG] - Autocomplete's keyboard shortcuts behave weirdly HOT 6
- Styles of NextUI Components Not Displayed on Vercel Deployment HOT 4
- [BUG] - NextUIProvider navigate not being called HOT 3
- [BUG] - Some components are missing Slots section in their documentation. HOT 3
- [BUG] - Card component "flashes" when switching between light and dark color modes HOT 3
- [BUG] - Popover's arrow should combine with the border line of the box HOT 1
- [BUG] - Blur is not working on iPhone HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nextui.