Skip to content

type error with useMenu example from docs #3440

Answered by bstro
bstro asked this question in Q&A
Discussion options

You must be logged in to vote

quoting @LFDanLu so I can mark as answer:

I believe you have to supply to useMenuTrigger: https://codesandbox.io/s/restless-paper-qylnk7?file=/src/components/MenuButton.tsx:618-684. That way you match with your type for TreeProps in Menu. As for the spread operation for collection, not sure why that is complaining, you should be able to spread an iterator. Perhaps a ES target issue in the sandbox.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@bstro
Comment options

@snowystinger
Comment options

@bstro
Comment options

@LFDanLu
Comment options

LFDanLu Aug 25, 2022
Collaborator

@bstro
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by bstro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants