Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-simple-dropdown",
"version": "3.2.0",
"version": "3.2.1",
"description": "Non-prescriptive React.js dropdown toolkit",
"main": "lib/components/Dropdown.js",
"scripts": {
Expand Down Expand Up @@ -78,7 +78,7 @@
"zuul": "^3.11.1"
},
"peerDependencies": {
"react": "0.14.x || 15.x",
"react-dom": "0.14.x || 15.x"
"react": "0.14.x || 15.x || 16.x",
"react-dom": "0.14.x || 15.x || 16.x"
}
}
4 changes: 2 additions & 2 deletions src/components/Dropdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class Dropdown extends Component {
});
// stick callback on trigger element
const boundChildren = React.Children.map(children, child => {
if (child.type === DropdownTrigger) {
if (child.type === DropdownTrigger || child.type.prototype instanceof DropdownTrigger) {
const originalOnClick = child.props.onClick;
child = cloneElement(child, {
ref: 'trigger',
Expand All @@ -96,7 +96,7 @@ class Dropdown extends Component {
}
}
});
} else if (child.type === DropdownContent && removeElement && !active) {
} else if ((child.type === DropdownContent || child.type.prototype instanceof DropdownContent) && removeElement && !active) {
child = null;
}
return child;
Expand Down