I want to use the react Dropdownbutton to build a list, but i receive the following error :
TypeError: react_dropdown__WEBPACK_IMPORTED_MODULE_6__.Dropdown is undefined
Here is my code :
render() {
return (
<div className="Upload">
{this.renderNotes()}
<Dropdown>
<Dropdown.Toggle variant="success" id="dropdown-basic">
Dropdown Button
</Dropdown.Toggle>
<Dropdown.Menu>
<Dropdown.Item href="#/action-1">Action</Dropdown.Item>
<Dropdown.Item href="#/action-2">Another action</Dropdown.Item>
<Dropdown.Item href="#/action-3">Something else</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
</div>
);
And the import :
import { Dropdown } from "react-dropdown";
I have install it using the command : npm install react-dropdown --save
Does someone have an idea ?
Aucun commentaire:
Enregistrer un commentaire