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

Getting warning with <Popover /> component #44

Open
Lesleyvdp opened this issue Jan 16, 2021 · 0 comments
Open

Getting warning with <Popover /> component #44

Lesleyvdp opened this issue Jan 16, 2021 · 0 comments

Comments

@Lesleyvdp
Copy link

Lesleyvdp commented Jan 16, 2021

I'm using the Popover component the way it is described by the documentation except it is throwing a warning in the console.

The warning:

Warning: Invalid value for prop toggle on

tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior
at div
at div
at InnerPopper (webpack-internal:///./node_modules/react-popper/lib/esm/Popper.js:52:35)
at Popper (webpack-internal:///./node_modules/react-popper/lib/esm/Popper.js:216:31)
at div
at PopperManager (webpack-internal:///./node_modules/shards-react/dist/shards-react.es.js:5626:5)
at Popover (webpack-internal:///./node_modules/shards-react/dist/shards-react.es.js:5857:5)
at InformationPopover (webpack-internal:///./components/Navbar/InformationPopover/InformationPopover.tsx:17:21)

The code I'm using:

<>
    <Button id="nav-toggle-popover" onClick={togglePopover}>
      Info
    </Button>
    <Popover placement="bottom" target="#nav-toggle-popover" toggle={togglePopover} open={isOpen}>
        <PopoverHeader>Information</PopoverHeader>
        <PopoverBody>How the app works</PopoverBody>
    </Popover>
</>

react version: 17.0.1
react-dom version: 17.0.1
shards-react version: 1.0.3

Note:
Everything does work the way it's supposed to, except I wouldn't expect a warning to be thrown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant