diff --git a/components/transfer/ListBody.tsx b/components/transfer/ListBody.tsx index 4490cfbd5a..79dfa89eb0 100644 --- a/components/transfer/ListBody.tsx +++ b/components/transfer/ListBody.tsx @@ -73,11 +73,11 @@ const TransferListBody: React.ForwardRefRenderFunction< } }, [filteredRenderItems, mergedPagination, pageSize]); - const onInternalClick = (item: RecordType, e: React.MouseEvent) => { + const onInternalClick = (item: KeyWiseTransferItem, e: React.MouseEvent) => { onItemSelect(item.key, !selectedKeys.includes(item.key), e); }; - const onRemove = (item: RecordType) => { + const onRemove = (item: KeyWiseTransferItem) => { onItemRemove?.([item.key]); }; @@ -130,8 +130,8 @@ const TransferListBody: React.ForwardRefRenderFunction< renderedEl={renderedEl} prefixCls={prefixCls} showRemove={showRemove} - onClick={onInternalClick as any} - onRemove={onRemove as any} + onClick={onInternalClick} + onRemove={onRemove} checked={selectedKeys.includes(item.key)} disabled={globalDisabled || item.disabled} /> diff --git a/components/transfer/list.tsx b/components/transfer/list.tsx index ef4bc886fe..f9c92a6853 100644 --- a/components/transfer/list.tsx +++ b/components/transfer/list.tsx @@ -203,7 +203,7 @@ const TransferList = (
) => void; + onChange?: (e: React.ChangeEvent) => void; handleClear?: () => void; value?: string; disabled?: boolean;