blob: 4fa240f6f2d24165a42ac3e53087cf7ba0af70cc [file]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Cell, ColumnDef, Row } from "@tanstack/react-table";
export interface TableProps {
fetchData?: any;
data: any[];
columns: ColumnDef<any>[];
isFetching?: boolean;
skeletonCount?: number;
skeletonHeight?: number;
headerComponent?: JSX.Element;
pageCount?: number;
totalCount?: number;
defaultColumnVisibility?: any;
page?: (page: number) => void;
onClickRow?: (cell: Cell<any, unknown>, row: Row<any>) => void;
emptyText?: string;
children?: React.ReactNode | React.ReactElement;
handleRow?: () => void;
defaultColumnParams?: string;
columnVisibility: boolean;
currentpageIndex?: number;
currentpageSize?: number;
refreshTable?: () => void;
defaultSortCol?: any;
clientSideSorting?: boolean;
columnSort: boolean;
showPagination: boolean;
showRowSelection: boolean;
tableFilters?: boolean;
expandRow?: boolean;
auditTableDetails?: any;
assignFilters?: { classifications: boolean; term: boolean } | null;
queryBuilder?: boolean;
allTableFilters?: boolean;
columnVisibilityParams?: boolean;
setUpdateTable?: any;
isfilterQuery?: any;
isClientSidePagination?: boolean;
isEmptyData?: boolean;
setIsEmptyData?: React.Dispatch<React.SetStateAction<boolean>>;
showGoToPage?: boolean;
customLeftButton?: React.ReactNode;
/** Client pagination: default rows per page (e.g. schema tab uses 100 to match relationship API). */
defaultPageSize?: number;
/** Client pagination: invoked when the user changes page size (e.g. sync schema relationship chunk limit). */
onClientPageSizeChange?: (pageSize: number) => void;
}