chore: update api name

This commit is contained in:
小豪 2024-11-03 00:21:58 +08:00
parent 9df39a3002
commit a0be0138d6
3 changed files with 5 additions and 5 deletions

View File

@ -124,7 +124,7 @@ Common props ref[Common props](/docs/react/common-props)
| value | Current selected option (considered as a immutable array) | string \| string\[] \| <br />number \| number\[] \| <br />LabeledValue \| LabeledValue\[] | - | |
| variant | Variants of selector | `outlined` \| `borderless` \| `filled` | `outlined` | 5.13.0 |
| virtual | Disable virtual scroll when set to false | boolean | true | 4.1.0 |
| onBlurRemoveSpace | Whether to remove space when losing focus, only applies when `mode` is `tags` | boolean | true | |
| onBlurRemoveSpaces | Whether to remove space when losing focus, only applies when `mode` is `tags` | boolean | true | |
| onBlurAddValue | Whether to add the input value to the selected item when losing focus, only applies when `mode` is `tags` | boolean | true | |
| onBlur | Called when blur | function | - | |
| onChange | Called when select an option or input value change | function(value, option:Option \| Array&lt;Option>) | - | |

View File

@ -86,7 +86,7 @@ export interface SelectProps<
* @description Whether to remove spaces on blur
* @default true
*/
onBlurRemoveSpace?: boolean;
onBlurRemoveSpaces?: boolean;
/**
* @description Whether to add value on blur
* @default true
@ -130,7 +130,7 @@ const InternalSelect = <
tagRender,
maxCount,
prefix,
onBlurRemoveSpace = true,
onBlurRemoveSpaces = true,
onBlurAddValue = true,
...rest
} = props;
@ -319,7 +319,7 @@ const InternalSelect = <
dropdownStyle={{ ...dropdownStyle, zIndex }}
maxCount={isMultiple ? maxCount : undefined}
tagRender={isMultiple ? tagRender : undefined}
onBlurRemoveSpace={onBlurRemoveSpace}
onBlurRemoveSpaces={onBlurRemoveSpaces}
onBlurAddValue={onBlurAddValue}
/>,
);

View File

@ -125,7 +125,7 @@ return (
| value | 指定当前选中的条目多选时为一个数组。value 数组引用未变化时Select 不会更新) | string \| string\[] \| <br />number \| number\[] \| <br />LabeledValue \| LabeledValue\[] | - | |
| variant | 形态变体 | `outlined` \| `borderless` \| `filled` | `outlined` | 5.13.0 |
| virtual | 设置 false 时关闭虚拟滚动 | boolean | true | 4.1.0 |
| onBlurRemoveSpace | 标签形式下,失去焦点时是否移除空格,仅在 `mode="tags"` 时生效 | boolean | true | |
| onBlurRemoveSpaces | 标签形式下,失去焦点时是否移除空格,仅在 `mode="tags"` 时生效 | boolean | true | |
| onBlurAddValue | 标签形式下,失去焦点时是否将输入框的值添加到选中项中,仅在 `mode="tags"` 时生效 | boolean | true | |
| onBlur | 失去焦点时回调 | function | - | |
| onChange | 选中 option或 input 的 value 变化时,调用此函数 | function(value, option:Option \| Array&lt;Option>) | - | |