From 7db31a19598fd162483d309db75e8a1ccb36d042 Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 30 Dec 2022 17:21:21 +0800 Subject: [PATCH] docs: clarify Transfer filterOption description (#39916) close #39907 close #39906 --- components/transfer/index.en-US.md | 2 +- components/transfer/index.zh-CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/transfer/index.en-US.md b/components/transfer/index.en-US.md index e5e1aab491fa..592088d1ba7b 100644 --- a/components/transfer/index.en-US.md +++ b/components/transfer/index.en-US.md @@ -36,7 +36,7 @@ One or more elements can be selected from either column, one click on the proper | --- | --- | --- | --- | --- | | dataSource | Used for setting the source data. The elements that are part of this array will be present the left column. Except the elements whose keys are included in `targetKeys` prop | [RecordType extends TransferItem = TransferItem](https://github.com/ant-design/ant-design/blob/1bf0bab2a7bc0a774119f501806e3e0e3a6ba283/components/transfer/index.tsx#L12)\[] | \[] | | | disabled | Whether disabled transfer | boolean | false | | -| filterOption | A function to determine whether an item should show in search result list | (inputValue, option): boolean | - | | +| filterOption | A function to determine whether an item should show in search result list, only works when searching | (inputValue, option): boolean | - | | | footer | A function used for rendering the footer | (props, { direction }) => ReactNode | - | direction: 4.17.0 | | listStyle | A custom CSS style used for rendering the transfer columns | object \| ({direction: `left` \| `right`}) => object | - | | | locale | The i18n text including filter, empty text, item unit, etc | { itemUnit: string; itemsUnit: string; searchPlaceholder: string; notFoundContent: ReactNode \| ReactNode[]; } | { itemUnit: `item`, itemsUnit: `items`, notFoundContent: `The list is empty`, searchPlaceholder: `Search here` } | | diff --git a/components/transfer/index.zh-CN.md b/components/transfer/index.zh-CN.md index 8e40835396ce..fab01f2bbd91 100644 --- a/components/transfer/index.zh-CN.md +++ b/components/transfer/index.zh-CN.md @@ -39,7 +39,7 @@ cover: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*EAApQ5ephigAAAAAAA | --- | --- | --- | --- | --- | | dataSource | 数据源,其中的数据将会被渲染到左边一栏中,`targetKeys` 中指定的除外 | [RecordType extends TransferItem = TransferItem](https://github.com/ant-design/ant-design/blob/1bf0bab2a7bc0a774119f501806e3e0e3a6ba283/components/transfer/index.tsx#L12)\[] | \[] | | | disabled | 是否禁用 | boolean | false | | -| filterOption | 接收 `inputValue` `option` 两个参数,当 `option` 符合筛选条件时,应返回 true,反之则返回 false | (inputValue, option): boolean | - | | +| filterOption | 根据搜索内容进行筛选,接收 `inputValue` `option` 两个参数,当 `option` 符合筛选条件时,应返回 true,反之则返回 false | (inputValue, option): boolean | - | | | footer | 底部渲染函数 | (props, { direction }) => ReactNode | - | direction: 4.17.0 | | listStyle | 两个穿梭框的自定义样式 | object\|({direction: `left` \| `right`}) => object | - | | | locale | 各种语言 | { itemUnit: string; itemsUnit: string; searchPlaceholder: string; notFoundContent: ReactNode \| ReactNode[]; } | { itemUnit: `项`, itemsUnit: `项`, searchPlaceholder: `请输入搜索内容` } | |