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] - Dropdown example not working #1963

Closed
vinkumdev opened this issue Nov 12, 2023 · 1 comment
Closed

[BUG] - Dropdown example not working #1963

vinkumdev opened this issue Nov 12, 2023 · 1 comment
Labels
🐛 Type: Bug Something isn't working

Comments

@vinkumdev
Copy link

NextUI Version

2.2.9

Describe the bug

From the sample code, if i click on drop-down i get

Unhandled Runtime Error
Error: Unknown element <[object Object]> in collection.

Call Stack
$eb2240fc39a57fa5$export$bf788dd355e3a401.getFullNode
node_modules/@react-stately/collections/dist/import.mjs (205:0)
getFullNode.next
<anonymous>
$eb2240fc39a57fa5$export$bf788dd355e3a401.iterateCollection
node_modules/@react-stately/collections/dist/import.mjs (161:0)
iterateCollection.next
<anonymous>
[Symbol.iterator]
node_modules/@react-stately/collections/dist/import.mjs (289:0)
Generator.next
<anonymous>
new $05ca4cd7c4a5a999$export$863faf230ee2118a
node_modules/@react-stately/tree/dist/import.mjs (78:0)
import React from "react";
import {Dropdown, DropdownTrigger, DropdownMenu, DropdownItem, Button} from "@nextui-org/react";

export default function App() {
    return (
        <Dropdown>
            <DropdownTrigger>
                <Button
                    variant="bordered"
                >
                    Open Menu
                </Button>
            </DropdownTrigger>
            <DropdownMenu aria-label="Static Actions">
                <DropdownItem key="new">New file</DropdownItem>
                <DropdownItem key="copy">Copy link</DropdownItem>
                <DropdownItem key="edit">Edit file</DropdownItem>
                <DropdownItem key="delete" className="text-danger" color="danger">
                    Delete file
                </DropdownItem>
            </DropdownMenu>
        </Dropdown>
    );
}

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

Create fresh nextjs with no typescript
Add dropdown form example

Expected behavior

I expect drop-down menu to open but i get error on click

Screenshots or Videos

Screenshot 2023-11-12 at 17 43 43

Operating System Version

macos

Browser

Chrome

@vinkumdev vinkumdev added the 🐛 Type: Bug Something isn't working label Nov 12, 2023
@jrgarciadev
Copy link
Member

jrgarciadev commented Nov 13, 2023

Hey @vinkumdev please check this comment: #1403 (comment)

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
Development

No branches or pull requests

2 participants