UNPKG

@arteneo/forge

Version:
22 lines (21 loc) 1.54 kB
import React from "react"; import SortingInterface from "../../../components/Table/definitions/SortingInterface"; import FilterValuesInterface from "../../../components/Table/definitions/FilterValuesInterface"; interface TableQueryContextProps { setQuery: (queryKey: string, page: number, rowsPerPage: number, sorting: SortingInterface, filters: FilterValuesInterface) => void; getQueryPage: (queryKey: string, defaultPage: number) => number; getQueryRowsPerPage: (queryKey: string, defaultRowsPerPage: number) => number; getQueryFilters: (queryKey: string, defaultFilters: FilterValuesInterface) => FilterValuesInterface; getQuerySorting: (queryKey: string, defaultSorting: SortingInterface) => SortingInterface; setQueryPage: (queryKey: string, page: number, overrideQuery?: boolean) => void; setQueryRowsPerPage: (queryKey: string, rowsPerPage: number, overrideQuery?: boolean) => void; setQueryFilters: (queryKey: string, filters: FilterValuesInterface, overrideQuery?: boolean) => void; setQuerySorting: (queryKey: string, sorting: SortingInterface, overrideQuery?: boolean) => void; } interface TableQueryProviderProps { children: React.ReactNode; } declare const TableQueryContext: React.Context<TableQueryContextProps>; declare const TableQueryProvider: ({ children }: TableQueryProviderProps) => React.JSX.Element; declare const useTableQuery: () => TableQueryContextProps; export { TableQueryContext, TableQueryContextProps, TableQueryProvider, TableQueryProviderProps, useTableQuery };