Skip to content

Commit

Permalink
fix: Do not pass through undefined child bsPrefix in Dropdown.Toggle (#…
Browse files Browse the repository at this point in the history
…3507)

Fixes #3456
  • Loading branch information
adriang133 authored and taion committed Feb 28, 2019
1 parent 5a588ab commit e7bf8db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/DropdownToggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,17 @@ class DropdownToggle extends React.Component {
...props
} = this.props;

if (childBsPrefix !== undefined) {
props.bsPrefix = childBsPrefix;
}

// This intentionally forwards size and variant (if set) to the
// underlying component, to allow it to render size and style variants.
return (
<BaseDropdownToggle>
{({ toggle, props: toggleProps }) => (
<Component
onClick={toggle}
bsPrefix={childBsPrefix}
className={classNames(
className,
bsPrefix,
Expand Down

0 comments on commit e7bf8db

Please sign in to comment.