@aplus-frontend/ui
Version:
51 lines (50 loc) • 2.15 kB
TypeScript
import { OpenOptions, UseTableSelectModalProps } from '../interface';
import { Recordable } from '../../../type';
import { TableColumnsType } from '@aplus-frontend/antdv';
import { InternalPagingType } from '../../../ap-table/hooks/use-table-paging-ng';
import { ApFormSearchFormPopoverSorterItem } from '../../..';
export declare function useTableSelectModal<TableRowType = Record<string, any>>(props: UseTableSelectModalProps<TableRowType>): {
reloadApTableData: () => void;
resetApTableData: () => void;
getApTableInstance: () => {
submit: () => void;
submitWith: (resetCurrent?: boolean) => void;
reset: () => void;
refresh: () => void;
setSearchFormValues: (fields: Partial< Recordable>) => void;
getSearchFormValues: (transform?: boolean) => Partial< Recordable>;
dataSource: any;
rowSelection?: {
select: (item: any) => void;
selectAll: () => void;
unSelectAll: () => void;
selectedRows: any[];
unSelect: (item: any) => void;
isSelected: (item: any) => boolean;
clearAll: () => void;
toggleSelect: (item: any) => void;
selectMulti: (items: any[]) => void;
unSelectMulti: (items: any[]) => void;
} | undefined;
getShownColumns: () => TableColumnsType<any>;
scrollBar: {
x: {
getCurrentScroll: () => number;
scroll: (percent: number) => void | undefined;
};
y: undefined;
};
getPaging: () => InternalPagingType;
setPaging: (nextPaging: InternalPagingType, refreshImmediately?: boolean) => void;
getSearchFormSorterItems: () => ApFormSearchFormPopoverSorterItem[];
setSearchFormSorterItems: (sortedItems: ApFormSearchFormPopoverSorterItem[]) => void;
resetSearchFormSorterItems: () => void;
} | null | undefined;
isDestroyed: true;
open: (selected?: any[], options?: OpenOptions) => Promise<{
keys: any[];
rows: TableRowType[];
}>;
destroy: () => void;
close: () => void;
};