From df4097ca4de6aa553059f3707b81eb2ee2c9321b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=84=9A=E6=8C=87=E5=AF=BC?= Date: Sun, 4 Feb 2018 16:42:33 +0800 Subject: [PATCH] [Select] Pass Option as onChange and onSelect second argument (#9228) --- components/select/index.en-US.md | 6 +++--- components/select/index.zh-CN.md | 6 +++--- package.json | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/select/index.en-US.md b/components/select/index.en-US.md index 59edae2bfc..c95bf07649 100644 --- a/components/select/index.en-US.md +++ b/components/select/index.en-US.md @@ -47,15 +47,15 @@ Select component to select value from options. | tokenSeparators | Separator used to tokenize on tag/multiple mode | string\[] | | | value | Current selected option. | string\|number\|string\[]\|number\[] | - | | onBlur | Called when blur | function | - | -| onChange | Called when select an option or input value change, or value of input is changed in combobox mode | function(value, label) | - | -| onDeselect | Called when a option is deselected, the params are option's value (or key) . only called for multiple or tags, effective in multiple or tags mode only. | function(value) | - | +| onChange | Called when select an option or input value change, or value of input is changed in combobox mode | function(value, option:Option/Array) | - | +| onDeselect | Called when a option is deselected, the params are option's value (or key) . only called for multiple or tags, effective in multiple or tags mode only. | function(value, option:Option) | - | | onFocus | Called when focus | function | - | | onInputKeyDown | Called when key pressed | function | - | | onMouseEnter | Called when mouse enter | function | - | | onMouseLeave | Called when mouse leave | function | - | | onPopupScroll | Called when dropdown scrolls | function | - | | onSearch | Callback function that is fired when input changed. | function(value: string) | | -| onSelect | Called when a option is selected, the params are option's value (or key) and option instance. | function(value, option) | - | +| onSelect | Called when a option is selected, the params are option's value (or key) and option instance. | function(value, option:Option) | - | ### Select Methods diff --git a/components/select/index.zh-CN.md b/components/select/index.zh-CN.md index 92379658bc..892736e1d3 100644 --- a/components/select/index.zh-CN.md +++ b/components/select/index.zh-CN.md @@ -51,14 +51,14 @@ title: Select | tokenSeparators | 在 tags 和 multiple 模式下自动分词的分隔符 | string\[] | | | value | 指定当前选中的条目 | string\|string\[]\|number\|number\[] | - | | onBlur | 失去焦点的时回调 | function | - | -| onChange | 选中 option,或 input 的 value 变化(combobox 模式下)时,调用此函数 | function(value) | - | -| onDeselect | 取消选中时调用,参数为选中项的 value (或 key) 值,仅在 multiple 或 tags 模式下生效 | function(value) | - | +| onChange | 选中 option,或 input 的 value 变化(combobox 模式下)时,调用此函数 | function(value, option:Option/Array) | - | +| onDeselect | 取消选中时调用,参数为选中项的 value (或 key) 值,仅在 multiple 或 tags 模式下生效 | function(value,option:Option) | - | | onFocus | 获得焦点时回调 | function | - | | onMouseEnter | 鼠标移入时回调 | function | - | | onMouseLeave | 鼠标移出时回调 | function | - | | onPopupScroll | 下拉列表滚动时的回调 | function | - | | onSearch | 文本框值变化时回调 | function(value: string) | | -| onSelect | 被选中时调用,参数为选中项的 value (或 key) 值 | function(value, option) | - | +| onSelect | 被选中时调用,参数为选中项的 value (或 key) 值 | function(value, option:Option) | - | > 注意,如果发现下拉菜单跟随页面滚动,或者需要在其他弹层中触发 Select,请尝试使用 `getPopupContainer={triggerNode => triggerNode.parentNode}` 将下拉弹层渲染节点固定在触发器的父元素中。 diff --git a/package.json b/package.json index 5cdcb65781..c111dbb2d4 100755 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "rc-pagination": "~1.15.0", "rc-progress": "~2.2.2", "rc-rate": "~2.4.0", - "rc-select": "~7.5.0", + "rc-select": "~7.7.0", "rc-slider": "~8.5.0", "rc-steps": "~3.0.0", "rc-switch": "~1.6.0",