Skip to content

Commit 960144e

Browse files
feat(module:transfer): support standalone component (#8208)
1 parent d4426fc commit 960144e

File tree

6 files changed

+123
-128
lines changed

6 files changed

+123
-128
lines changed

components/transfer/doc/index.en-US.md

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -20,69 +20,69 @@ import { NzTransferModule } from 'ng-zorro-antd/transfer';
2020

2121
## API
2222

23-
### nz-transfer
24-
25-
| Property | Description | Type | Default |
26-
| -------- | ----------- | ---- | ------- |
27-
| `[nzDataSource]` | Used for setting the data source. Except for the elements whose keys are `direction: 'right'` prop, or using `nzTargetKeys` prop. | `TransferItem[]` | `[]` |
28-
| `[nzDisabled]` | Whether the transfer is disabled | `boolean` | `false` |
29-
| `[nzTitles]` | A set of titles that are sorted from left to right. | `string[]` | `['', '']` |
30-
| `[nzOperations]` | A set of operations that are sorted from bottom to top. | `string[]` | `['', '']` |
31-
| `[nzListStyle]` | A custom CSS style used for rendering the transfer columns. equals to `ngStyle` | `object` | - |
32-
| `[nzItemUnit]` | single unit | `string` | `'item'` |
33-
| `[nzItemsUnit]` | multiple unit | `string` | `'items'` |
34-
| `[nzRenderList]` | Customize render list, please refer to the case. | `Array<TemplateRef<void> \| null>` | `[null, null]` |
35-
| `[nzRender]` | The function to generate the item shown on a column. please refer to the case. | `TemplateRef<void>` | - |
36-
| `[nzFooter]` | A function used for rendering the footer. please refer to the case. | `TemplateRef<void>` | - |
37-
| `[nzShowSearch]` | Whether a search box is shown on each column. | `boolean` | `false` |
38-
| `[nzFilterOption]` | A function to determine whether an item should be shown in a search result list | `(inputValue: string, item: TransferItem) => boolean` | - |
39-
| `[nzSearchPlaceholder]` | The hint text of the search box. | `string` | `'Search here'` |
40-
| `[nzNotFoundContent]` | Text to display when a column is empty. | `string` | `'The list is empty'` |
41-
| `[nzCanMove]` | A function to determine what items should be moved (by default all checked items are moved). please refer to the case. | `(arg: TransferCanMove) => Observable<TransferItem[]>` | - |
42-
| `[nzSelectedKeys]` | A set of keys of selected items. | `string[]` | - |
43-
| `[nzTargetKeys]` | A set of keys of elements that are listed on the right column. | `string[]` | - |
44-
| `[nzStatus]` | Set validation status | `'error' \| 'warning'` | - |
45-
| `(nzChange)` | A callback function that is executed when the transfer between columns is complete. | `EventEmitter<TransferChange>` | - |
46-
| `(nzSearchChange)` | A callback function which is executed when search field are changed | `EventEmitter<TransferSearchChange>` | - |
47-
| `(nzSelectChange)` | A callback function which is executed when selected items are changed. | `EventEmitter<TransferSearchChange>` | - |
23+
### nz-transfer:standalone
24+
25+
| Property | Description | Type | Default |
26+
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | --------------------- |
27+
| `[nzDataSource]` | Used for setting the data source. Except for the elements whose keys are `direction: 'right'` prop, or using `nzTargetKeys` prop. | `TransferItem[]` | `[]` |
28+
| `[nzDisabled]` | Whether the transfer is disabled | `boolean` | `false` |
29+
| `[nzTitles]` | A set of titles that are sorted from left to right. | `string[]` | `['', '']` |
30+
| `[nzOperations]` | A set of operations that are sorted from bottom to top. | `string[]` | `['', '']` |
31+
| `[nzListStyle]` | A custom CSS style used for rendering the transfer columns. equals to `ngStyle` | `object` | - |
32+
| `[nzItemUnit]` | single unit | `string` | `'item'` |
33+
| `[nzItemsUnit]` | multiple unit | `string` | `'items'` |
34+
| `[nzRenderList]` | Customize render list, please refer to the case. | `Array<TemplateRef<void> \| null>` | `[null, null]` |
35+
| `[nzRender]` | The function to generate the item shown on a column. please refer to the case. | `TemplateRef<void>` | - |
36+
| `[nzFooter]` | A function used for rendering the footer. please refer to the case. | `TemplateRef<void>` | - |
37+
| `[nzShowSearch]` | Whether a search box is shown on each column. | `boolean` | `false` |
38+
| `[nzFilterOption]` | A function to determine whether an item should be shown in a search result list | `(inputValue: string, item: TransferItem) => boolean` | - |
39+
| `[nzSearchPlaceholder]` | The hint text of the search box. | `string` | `'Search here'` |
40+
| `[nzNotFoundContent]` | Text to display when a column is empty. | `string` | `'The list is empty'` |
41+
| `[nzCanMove]` | A function to determine what items should be moved (by default all checked items are moved). please refer to the case. | `(arg: TransferCanMove) => Observable<TransferItem[]>` | - |
42+
| `[nzSelectedKeys]` | A set of keys of selected items. | `string[]` | - |
43+
| `[nzTargetKeys]` | A set of keys of elements that are listed on the right column. | `string[]` | - |
44+
| `[nzStatus]` | Set validation status | `'error' \| 'warning'` | - |
45+
| `(nzChange)` | A callback function that is executed when the transfer between columns is complete. | `EventEmitter<TransferChange>` | - |
46+
| `(nzSearchChange)` | A callback function which is executed when search field are changed | `EventEmitter<TransferSearchChange>` | - |
47+
| `(nzSelectChange)` | A callback function which is executed when selected items are changed. | `EventEmitter<TransferSearchChange>` | - |
4848

4949
#### TransferItem
5050

51-
| Property | Description | Type | Default |
52-
| -------- | ----------- | ---- | ------- |
53-
| title | Used to display and search keyword | `string` | - |
54-
| direction | Used for setting the data source. Except the elements whose keys are `direction: 'right'` prop. | `'left' \| 'right'` | - |
55-
| disabled | specifies whether the checkbox is disabled | `boolean` | `false` |
56-
| checked | specifies whether the checkbox is selected | `boolean` | `false` |
51+
| Property | Description | Type | Default |
52+
| --------- | ----------------------------------------------------------------------------------------------- | ------------------- | ------- |
53+
| title | Used to display and search keyword | `string` | - |
54+
| direction | Used for setting the data source. Except the elements whose keys are `direction: 'right'` prop. | `'left' \| 'right'` | - |
55+
| disabled | specifies whether the checkbox is disabled | `boolean` | `false` |
56+
| checked | specifies whether the checkbox is selected | `boolean` | `false` |
5757

5858
#### TransferCanMove
5959

60-
| Property | Description | Type | Default |
61-
| -------- | ----------- | ---- | ------- |
62-
| direction | data direction | `'left' \| 'right'` | - |
63-
| list | Used for setting the source data. | `TransferItem[]` | `[]` |
60+
| Property | Description | Type | Default |
61+
| --------- | --------------------------------- | ------------------- | ------- |
62+
| direction | data direction | `'left' \| 'right'` | - |
63+
| list | Used for setting the source data. | `TransferItem[]` | `[]` |
6464

6565
#### TransferChange
6666

67-
| Property | Description | Type | Default |
68-
| -------- | ----------- | ---- | ------- |
69-
| from | data direction | `'left' \| 'right'` | - |
70-
| to | data direction | `'left' \| 'right'` | - |
71-
| list | Used for setting the source data. | `TransferItem[]` | `[]` |
67+
| Property | Description | Type | Default |
68+
| -------- | --------------------------------- | ------------------- | ------- |
69+
| from | data direction | `'left' \| 'right'` | - |
70+
| to | data direction | `'left' \| 'right'` | - |
71+
| list | Used for setting the source data. | `TransferItem[]` | `[]` |
7272

7373
#### TransferSearchChange
7474

75-
| Property | Description | Type | Default |
76-
| -------- | ----------- | ---- | ------- |
77-
| direction | data direction | `'left' \| 'right'` | - |
78-
| value | Search keyword | `string` | - |
75+
| Property | Description | Type | Default |
76+
| --------- | -------------- | ------------------- | ------- |
77+
| direction | data direction | `'left' \| 'right'` | - |
78+
| value | Search keyword | `string` | - |
7979

8080
#### nzRenderList
8181

82-
| Property | Description | Type | Default |
83-
| -------- | ----------- | ---- | ------- |
84-
| `direction` | List render direction | `'left' \| 'right'` | - |
85-
| `disabled` | Disable list or not | `boolean` | - |
86-
| `items` | Filtered items | `TransferItem[]` | - |
87-
| `onItemSelect` | Select item | `(item: TransferItem) => void` | - |
88-
| `onItemSelectAll` | Select a group of items | `(selected: boolean) => void` | - |
82+
| Property | Description | Type | Default |
83+
| ----------------- | ----------------------- | ------------------------------ | ------- |
84+
| `direction` | List render direction | `'left' \| 'right'` | - |
85+
| `disabled` | Disable list or not | `boolean` | - |
86+
| `items` | Filtered items | `TransferItem[]` | - |
87+
| `onItemSelect` | Select item | `(item: TransferItem) => void` | - |
88+
| `onItemSelectAll` | Select a group of items | `(selected: boolean) => void` | - |

0 commit comments

Comments
 (0)