Fix: Dropdown.Button not fully disabled (#9013)

* fix(Dropdown): dropdown won't be fully disabled

* test(Dropdown): check  props pass to Dropdown
pull/9025/head
sallen450 7 years ago committed by Wei Zhu
parent 28c589da18
commit e0fb5b8866

@ -58,6 +58,7 @@ exports[`renders ./components/dropdown/demo/dropdown-button.md correctly 1`] = `
</button>
<button
class="ant-btn ant-dropdown-trigger ant-btn-default"
disabled=""
type="button"
>
<i

@ -14,6 +14,7 @@ describe('DropdownButton', () => {
<Menu.Item>foo</Menu.Item>
</Menu>
),
disabled: false,
trigger: ['hover'],
visible: true,
onVisibleChange: () => {},

@ -31,6 +31,7 @@ export default class DropdownButton extends React.Component<DropdownButtonProps,
const dropdownProps = {
align,
overlay,
disabled,
trigger: disabled ? [] : trigger,
onVisibleChange,
placement,
@ -53,7 +54,7 @@ export default class DropdownButton extends React.Component<DropdownButtonProps,
{children}
</Button>
<Dropdown {...dropdownProps}>
<Button type={type} disabled={disabled}>
<Button type={type}>
<Icon type="down" />
</Button>
</Dropdown>

Loading…
Cancel
Save