Skip to content

Commit

Permalink
fix(Dropdown): onVisibleChange param. (ant-design#4252)
Browse files Browse the repository at this point in the history
* fix(Dropdown): onVisibleChange param.

* doc(Dropdown): update onVisibleChange argument
  • Loading branch information
BANG88 authored Dec 14, 2016
1 parent bda303a commit 80ea247
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/dropdown/dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface DropDownProps {
trigger?: Array<'click' | 'hover'>;
overlay: React.ReactNode;
style?: React.CSSProperties;
onVisibleChange?: (e: {visible: boolean}) => void;
onVisibleChange?: (visible?: boolean) => void;
visible?: boolean;
align?: Object;
getPopupContainer?: () => HTMLElement;
Expand Down
4 changes: 2 additions & 2 deletions components/dropdown/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ title: Dropdown
| overlay | 菜单 | [Menu](/components/menu) | - |
| getPopupContainer | 菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位。[示例](http://codepen.io/anon/pen/xVBOVQ?editors=001) | Function(triggerNode) | () => document.body |
| visible | 菜单是否显示 | Boolean | - |
| onVisibleChange | 菜单显示状态改变时调用,参数为 { visible } | Function | - |
| onVisibleChange | 菜单显示状态改变时调用,参数为 visible | Function | - |

菜单可由 `antd.Menu` 取得,可设置 `onSelect` 回调,菜单还包括菜单项 `antd.Menu.Item`,分割线 `antd.Menu.Divider`

Expand All @@ -36,4 +36,4 @@ title: Dropdown
| trigger | 触发下拉的行为 | ['click'] or ['hover'] | ['hover'] |
| overlay | 菜单 | [Menu](/components/menu/) | - |
| visible | 菜单是否显示 | Boolean | - |
| onVisibleChange | 菜单显示状态改变时调用,参数为 { visible } | Function | - |
| onVisibleChange | 菜单显示状态改变时调用,参数为 visible | Function | - |

0 comments on commit 80ea247

Please sign in to comment.