PromoCursed/node_modules/antd/lib/transfer/hooks/useSelection.d.ts

11 lines
471 B
TypeScript
Raw Normal View History

2024-08-20 23:25:37 +04:00
import * as React from 'react';
import type { TransferKey } from '../interface';
export default function useSelection<T extends {
key: TransferKey;
}>(leftDataSource: T[], rightDataSource: T[], selectedKeys?: TransferKey[]): [
sourceSelectedKeys: TransferKey[],
targetSelectedKeys: TransferKey[],
setSourceSelectedKeys: React.Dispatch<React.SetStateAction<TransferKey[]>>,
setTargetSelectedKeys: React.Dispatch<React.SetStateAction<TransferKey[]>>
];