Browse Source

fix: Dropdown.Button should support getPopupContainer (#6527)

pull/6533/head
blankzust 8 years ago
committed by Benjy Cui
parent
commit
3c700cd1b7
  1. 4
      components/dropdown/dropdown-button.tsx

4
components/dropdown/dropdown-button.tsx

@ -11,6 +11,7 @@ export interface DropdownButtonProps extends ButtonGroupProps {
onClick?: React.MouseEventHandler<any>;
trigger?: ('click' | 'hover')[];
align?: any;
getPopupContainer?: (triggerNode: Element) => HTMLElement;
overlay: React.ReactNode;
visible?: boolean;
disabled?: boolean;
@ -29,7 +30,7 @@ export default class DropdownButton extends React.Component<DropdownButtonProps,
render() {
const {
type, overlay, trigger, align, children, className, onClick, prefixCls,
disabled, visible, onVisibleChange, placement, ...restProps,
disabled, visible, onVisibleChange, placement, getPopupContainer, ...restProps,
} = this.props;
const cls = classNames(prefixCls, className);
@ -39,6 +40,7 @@ export default class DropdownButton extends React.Component<DropdownButtonProps,
trigger: disabled ? [] : trigger,
onVisibleChange,
placement,
getPopupContainer,
};
if ('visible' in this.props) {

Loading…
Cancel
Save