feat: DatePicker support customize allowClear (#43811)

This commit is contained in:
kiner-tang(文辉) 2023-07-27 10:23:26 +08:00 committed by GitHub
parent b3ccc46ebe
commit 4858e60fe6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 3 deletions

View File

@ -11004,6 +11004,7 @@ exports[`renders components/date-picker/demo/disabled.tsx extend context correct
</span>
<span
class="ant-picker-clear"
role="button"
>
<span
aria-label="close-circle"
@ -25342,6 +25343,7 @@ exports[`renders components/date-picker/demo/format.tsx extend context correctly
</span>
<span
class="ant-picker-clear"
role="button"
>
<span
aria-label="close-circle"

View File

@ -1156,6 +1156,7 @@ exports[`renders components/date-picker/demo/disabled.tsx correctly 1`] = `
</span>
<span
class="ant-picker-clear"
role="button"
>
<span
aria-label="close-circle"
@ -2120,6 +2121,7 @@ exports[`renders components/date-picker/demo/format.tsx correctly 1`] = `
</span>
<span
class="ant-picker-clear"
role="button"
>
<span
aria-label="close-circle"

View File

@ -77,7 +77,7 @@ The following APIs are shared by DatePicker, RangePicker.
| Property | Description | Type | Default | Version |
| --- | --- | --- | --- | --- |
| allowClear | Whether to show clear button | boolean | true | |
| allowClear | Customize clear button | boolean \| { clearIcon?: ReactNode } | true | 5.8.0: Support object type |
| autoFocus | If get focus when component mounted | boolean | false | |
| bordered | Whether has border style | boolean | true | |
| className | The picker className | string | - | |

View File

@ -78,7 +78,7 @@ import locale from 'antd/locale/zh_CN';
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| --- | --- | --- | --- | --- |
| allowClear | 是否显示清除按钮 | boolean | true | |
| allowClear | 自定义清除按钮 | boolean \| { clearIcon?: ReactNode } | true | 5.8.0: 支持对象类型 |
| autoFocus | 自动获取焦点 | boolean | false | |
| bordered | 是否有边框 | boolean | true | |
| className | 选择器 className | string | - | |

View File

@ -137,7 +137,7 @@
"rc-motion": "^2.7.3",
"rc-notification": "~5.0.4",
"rc-pagination": "~3.5.0",
"rc-picker": "~3.11.0",
"rc-picker": "~3.12.0",
"rc-progress": "~3.4.1",
"rc-rate": "~2.12.0",
"rc-resize-observer": "^1.2.0",