Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: transfer text errors #48553

Merged
merged 2 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions components/locale/en_US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const localeValues: Locale = {
selectCurrent: 'Select current page',
removeCurrent: 'Remove current page',
selectAll: 'Select all data',
deselectAll: 'Deselect all data',
removeAll: 'Remove all data',
selectInvert: 'Invert current page',
},
Expand Down
1 change: 1 addition & 0 deletions components/locale/zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const localeValues: Locale = {
selectCurrent: '全选当页',
removeCurrent: '删除当页',
selectAll: '全选所有',
deselectAll: '取消全选',
removeAll: '删除全部',
selectInvert: '反选当页',
},
Expand Down
1 change: 1 addition & 0 deletions components/transfer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export interface TransferLocale {
itemsUnit: string;
remove?: string;
selectAll?: string;
deselectAll?: string;
selectCurrent?: string;
selectInvert?: string;
removeAll?: string;
Expand Down
4 changes: 2 additions & 2 deletions components/transfer/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ const TransferList = <RecordType extends KeyWiseTransferItem>(
searchPlaceholder,
notFoundContent,
selectAll,
deselectAll,
selectCurrent,
selectInvert,
removeAll,
Expand Down Expand Up @@ -325,7 +326,7 @@ const TransferList = <RecordType extends KeyWiseTransferItem>(
items = [
{
key: 'selectAll',
label: selectAll,
label: checkStatus === 'all' ? deselectAll : selectAll,
onClick() {
const keys = getEnabledItemKeys(filteredItems);
onItemSelectAll?.(keys, keys.length !== checkedKeys.length);
Expand Down Expand Up @@ -362,7 +363,6 @@ const TransferList = <RecordType extends KeyWiseTransferItem>(
},
];
}

const dropdown: React.ReactNode = (
<Dropdown className={`${prefixCls}-header-dropdown`} menu={{ items }} disabled={disabled}>
{isValidIcon(selectionsIcon) ? selectionsIcon : <DownOutlined />}
Expand Down