fix: add booking uid and link to insights routing downloads (#20007)
* fix: add booking uid and link to insights routing downloads * minor change --------- Co-authored-by: Tushar Bhatt <[email protected]> Co-authored-by: Benny Joo <[email protected]>
This commit is contained in:
3 files changed
+14
-10
No files matched your search
@@ -8,7 +8,7 @@ import { useDataTable } from "../hooks";
|
||||
|
||||
interface DataTablePaginationProps<TData> {
|
||||
table: Table<TData>;
|
||||
totalRowCount: number;
|
||||
totalRowCount?: number;
|
||||
paginationMode?: "infinite" | "standard";
|
||||
}
|
||||
|
||||
@@ -18,6 +18,9 @@ export function DataTablePagination<TData>({
|
||||
paginationMode = "infinite",
|
||||
}: DataTablePaginationProps<TData>) {
|
||||
const { pageIndex, pageSize, setPageIndex, setPageSize } = useDataTable();
|
||||
if (!totalRowCount) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (paginationMode === "infinite") {
|
||||
const loadedCount = table.getRowModel().rows.length;
|
||||
|
||||
@@ -141,15 +141,13 @@ export function DataTableWrapper<TData>({
|
||||
fetchMoreOnBottomReached(e.target as HTMLDivElement)
|
||||
: undefined
|
||||
}>
|
||||
{totalRowCount && (
|
||||
<div style={{ gridArea: "footer", marginTop: "1rem" }}>
|
||||
<DataTablePagination<TData>
|
||||
table={table}
|
||||
totalRowCount={totalRowCount}
|
||||
paginationMode={paginationMode}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<div style={{ gridArea: "footer", marginTop: "1rem" }}>
|
||||
<DataTablePagination<TData>
|
||||
table={table}
|
||||
totalRowCount={totalRowCount}
|
||||
paginationMode={paginationMode}
|
||||
/>
|
||||
</div>
|
||||
</DataTable>
|
||||
)}
|
||||
</>
|
||||
|
||||
Reference in new issue
Block a user