UNPKG

@aplus-frontend/ui

Version:

31 lines (30 loc) 1.32 kB
import { Ref, ComputedRef, ShallowRef } from 'vue'; import { ApColumnState, ApTableSettingType } from '../interface'; export declare const useTableColumnState: (columnSetting: ApTableSettingType, persistenceKey: Ref<string | undefined>, initialColumnState: ApColumnState[]) => { columnState: Ref<{ key: string | number; show?: boolean | undefined; fixed?: "left" | "right" | undefined; disabled?: boolean | undefined; label?: any; children?: /*elided*/ any[] | undefined; order?: number | undefined; }[], ApColumnState[] | { key: string | number; show?: boolean | undefined; fixed?: "left" | "right" | undefined; disabled?: boolean | undefined; label?: any; children?: /*elided*/ any[] | undefined; order?: number | undefined; }[]>; selectAll: () => void; unSelectAll: () => void; toggleSelect: (key: string, show?: boolean) => void; setColumnState: (nextColumnState: ApColumnState[]) => void; isAllSelected: ComputedRef<boolean>; toggleSelectAll: () => void; columnStateBackup: ShallowRef<ApColumnState[], ApColumnState[]>; setColumnStateBackup: (nextBackup: ApColumnState[]) => void; cacheColumnStateIfNeeded: (nextColumnState: ApColumnState[]) => void; };