UNPKG

@bhplugin/vue3-datatable

Version:

Vue3 Datatable - fully customizable & easy to use datatable library

25 lines (24 loc) 982 B
import { type Ref } from 'vue'; interface IUseSelectionOptions { filterItems: Ref<Array<Record<string, unknown>>>; uniqueKey: Ref<string | null>; } export declare function useSelection(options: IUseSelectionOptions): { selected: Ref<(string | number)[], (string | number)[]>; selectedAll: import("vue").ComputedRef<boolean | null>; getRowKey: (row: Record<string, unknown>, index: number) => string | number; selectAll: (checked: boolean) => void; clearSelection: () => void; selectRow: (index: number) => void; unselectRow: (index: number) => void; toggleRow: (index: number) => void; isRowSelected: (index: number) => boolean; getSelectedRows: () => Array<Record<string, unknown>>; clearSelectedRows: () => void; }; /** Compute the unique key field from columns. */ export declare const useUniqueKey: (columns: Ref<Array<{ isUnique?: boolean; field?: string; }>>) => import("vue").ComputedRef<string | null>; export {};