UNPKG

es-grid-template

Version:

es-grid-template

39 lines (36 loc) 1.14 kB
import { createContext } from 'react'; export const TableContext = /*#__PURE__*/createContext({ prefix: 'ui-rc', id: '', isDataTree: false, rowKey: 'rowId', dataSource: [], originData: [], expanded: {}, windowSize: { innerHeight: 0, innerWidth: 0 }, // triggerFilter: () => { }, setIsSelectionChange: () => {}, setSorterChange: () => {}, setFilterChange: () => {}, setExpanded: () => {}, handleCellClick: () => {} // startCellRef: { current: undefined } as React.MutableRefObject<IPositionCell | undefined>, // endCellRef: { current: undefined } as React.MutableRefObject<IPositionCell | undefined>, // focusedCellRef: { current: undefined } as React.MutableRefObject<IPositionCell | undefined>, // isSelectingRef: { current: false } as React.MutableRefObject<boolean>, // rangeStateRef: { // current: { // startRowIndex: undefined, // endRowIndex: undefined, // startColIndex: undefined, // endColIndex: undefined, // rowIds: [], // colIds: [], // colRange: [], // rowRange: [] // } // } as React.MutableRefObject<RangeState> });