UNPKG

@devfamily/admiral

Version:

Admiral is a frontend framework for creating back office using React. It provides out-of-the-box components and tools that make developing an admin interface easy and fast.

14 lines (13 loc) 716 B
import React from 'react'; import { TableRowSelection, Key, GetRowKey, TransformColumns } from '../interfaces'; export declare type GetCheckDisabled<RecordType> = (record: RecordType) => boolean; export declare function arrDel(list: Key[], value: Key): React.Key[]; export declare function arrAdd(list: Key[], value: Key): React.Key[]; interface UseSelectionConfig<RecordType> { prefixCls: string; pageData: RecordType[]; getRowKey: GetRowKey<RecordType>; getRecordByKey: (key: Key) => RecordType; } export default function useSelection<RecordType>(rowSelection: TableRowSelection<RecordType> | undefined, config: UseSelectionConfig<RecordType>): [TransformColumns<RecordType>, Set<Key>]; export {};