Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Footer/Cell.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { SummaryContext } from '.';
import { SummaryContext } from './Summary';
import Cell from '../Cell';
import TableContext from '../context/TableContext';
import type { AlignType } from '../interface';
Expand Down
11 changes: 10 additions & 1 deletion src/Footer/Summary.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import type * as React from 'react';
import * as React from 'react';
import Cell from './Cell';
import Row from './Row';
import type { ColumnType, StickyOffsets } from '../interface';

type FlattenColumns<RecordType> = readonly (ColumnType<RecordType> & { scrollbar?: boolean })[];

export const SummaryContext = React.createContext<{
stickyOffsets?: StickyOffsets;
scrollColumnIndex?: number;
flattenColumns?: FlattenColumns<any>;
}>({});

export interface SummaryProps {
fixed?: boolean | 'top' | 'bottom';
Expand Down
8 changes: 1 addition & 7 deletions src/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
import * as React from 'react';
import TableContext from '../context/TableContext';
import Summary from './Summary';
import Summary, { SummaryContext } from './Summary';
import type { ColumnType, StickyOffsets } from '../interface';

type FlattenColumns<RecordType> = readonly (ColumnType<RecordType> & { scrollbar?: boolean })[];

export const SummaryContext = React.createContext<{
stickyOffsets?: StickyOffsets;
scrollColumnIndex?: number;
flattenColumns?: FlattenColumns<any>;
}>({});

export interface FooterProps<RecordType> {
children: React.ReactNode;
stickyOffsets: StickyOffsets;
Expand Down