diff --git a/components/auto-complete/index.en-US.md b/components/auto-complete/index.en-US.md index 11ae2e245f..9d47a6e8e2 100644 --- a/components/auto-complete/index.en-US.md +++ b/components/auto-complete/index.en-US.md @@ -78,29 +78,3 @@ The differences with Select are: Please use `onChange` to manage control state. `onSearch` is used for searching input which is not the same as `onChange`. Besides, clicking on the option will not trigger the `onSearch` event. Related issue: [#18230](https://github.com/ant-design/ant-design/issues/18230) [#17916](https://github.com/ant-design/ant-design/issues/17916) - -### Part of the api in v3 are not available in v4? - -AutoComplete is an Input component that supports auto complete tips. As such, it should not support props like `labelInValue` that affect value display. In v3, the AutoComplete implementation can not handle the case where the `value` and `label` are identical. v4 not longer support `label` as the value input. - -Besides, to unify the API, `dataSource` is replaced with `options`. You can migrate with the following change: - -#### v3 - -```tsx -dataSource = ['light', 'bamboo']; -// or -dataSource = [ - { value: 'light', text: 'Light' }, - { value: 'bamboo', text: 'Bamboo' }, -]; -``` - -#### v4 - -```tsx -options = [ - { value: 'light', label: 'Light' }, - { value: 'bamboo', label: 'Bamboo' }, -]; -``` diff --git a/components/auto-complete/index.zh-CN.md b/components/auto-complete/index.zh-CN.md index 2c1ffee046..01a078e5bc 100644 --- a/components/auto-complete/index.zh-CN.md +++ b/components/auto-complete/index.zh-CN.md @@ -80,29 +80,3 @@ demo: 请使用 `onChange` 进行受控管理。`onSearch` 触发于搜索输入,与 `onChange` 时机不同。此外,点选选项时也不会触发 `onSearch` 事件。 相关 issue:[#18230](https://github.com/ant-design/ant-design/issues/18230) [#17916](https://github.com/ant-design/ant-design/issues/17916) - -### v3 的部分属性为何在 v4 中没有了? - -AutoComplete 组件是一个支持自动提示的 Input 组件,因而其不具有 `labelInValue` 等影响 value 展示的属性。在 v3 版本,AutoComplete 实现存在输入值如果遇到 `value` 与 `label` 相同时无法映射的问题。 v4 中不再支持 `label` 为值的输入形态。 - -此外为了统一 API,`dataSource` 改为 `options` 你可以如下转换: - -#### v3 - -```tsx -dataSource = ['light', 'bamboo']; -// or -dataSource = [ - { value: 'light', text: 'Light' }, - { value: 'bamboo', text: 'Bamboo' }, -]; -``` - -#### v4 - -```tsx -options = [ - { value: 'light', label: 'Light' }, - { value: 'bamboo', label: 'Bamboo' }, -]; -``` diff --git a/components/breadcrumb/index.en-US.md b/components/breadcrumb/index.en-US.md index 9b6afe9c2e..614cc6d1da 100644 --- a/components/breadcrumb/index.en-US.md +++ b/components/breadcrumb/index.en-US.md @@ -15,36 +15,6 @@ A breadcrumb displays the current location within a hierarchy. It allows going b - When you need to inform the user of where they are. - When the user may need to navigate back to a higher level. -### Usage upgrade after 4.24.0 - - - -```jsx -// works when >=4.24.0, recommended ✅ -const items = [ - { label: 'item 1', key: 'item-1' }, // remember to pass the key prop - { label: 'item 2', key: 'item-2' }, -]; -return ( - - Ant Design - -); - -// works when <4.24.0, deprecated when >=4.24.0 🙅🏻‍♀️ -const menu = ( - - item 1 - item 2 - -); -return ( - - Ant Design - -); -``` - ## Examples diff --git a/components/breadcrumb/index.zh-CN.md b/components/breadcrumb/index.zh-CN.md index 295b6c7e64..420b0e697f 100644 --- a/components/breadcrumb/index.zh-CN.md +++ b/components/breadcrumb/index.zh-CN.md @@ -16,36 +16,6 @@ demo: - 当需要告知用户『你在哪里』时; - 当需要向上导航的功能时。 -### 4.24.0 用法升级 - - - -```jsx -// >=4.24.0 可用,推荐的写法 ✅ -const items = [ - { label: '菜单项一', key: 'item-1' }, // 菜单项务必填写 key - { label: '菜单项二', key: 'item-2' }, -]; -return ( - - Ant Design - -); - -// <4.24.0 可用,>=4.24.0 时不推荐 🙅🏻‍♀️ -const menu = ( - - 菜单项一 - 菜单项二 - -); -return ( - - Ant Design - -); -``` - ## 代码演示 diff --git a/components/dropdown/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/dropdown/__tests__/__snapshots__/demo-extend.test.ts.snap index d96817e743..76a2678314 100644 --- a/components/dropdown/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/dropdown/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -3351,324 +3351,6 @@ Array [ ] `; -exports[`renders ./components/dropdown/demo/deprecated.tsx extend context correctly 1`] = ` -Array [ - -
-
- Hover me -
-
- - - -
-
-
, -
-
- -