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
4 changes: 1 addition & 3 deletions src/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import warning from 'rc-util/lib/warning';
import * as React from 'react';
import Body from './Body';
import ColGroup from './ColGroup';
import { EXPAND_COLUMN } from './constant';
import { EXPAND_COLUMN, INTERNAL_HOOKS } from './constant';
import TableContext from './context/TableContext';
import type { FixedHeaderProps } from './FixedHolder';
import FixedHolder from './FixedHolder';
Expand Down Expand Up @@ -82,8 +82,6 @@ const EMPTY_DATA = [];
// Used for customize scroll
const EMPTY_SCROLL_TARGET = {};

export const INTERNAL_HOOKS = 'rc-table-internal-hook';

export interface TableProps<RecordType = unknown>
extends Omit<LegacyExpandableProps<RecordType>, 'showExpandColumn'> {
prefixCls?: string;
Expand Down
2 changes: 2 additions & 0 deletions src/constant.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export const EXPAND_COLUMN = {} as const;

export const INTERNAL_HOOKS = 'rc-table-internal-hook';
2 changes: 1 addition & 1 deletion src/hooks/useExpand.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import warning from 'rc-util/lib/warning';
import * as React from 'react';
import { INTERNAL_HOOKS } from '../constant';
import type {
ExpandableConfig,
ExpandableType,
Expand All @@ -9,7 +10,6 @@ import type {
TriggerEventHandler,
} from '../interface';
import type { TableProps } from '../Table';
import { INTERNAL_HOOKS } from '../Table';
import { findAllChildrenKeys, renderExpandIcon } from '../utils/expandUtil';
import { getExpandableProps } from '../utils/legacyUtil';

Expand Down
4 changes: 2 additions & 2 deletions tests/Internal.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { mount } from 'enzyme';
import React from 'react';
import Table from '../src';
import { INTERNAL_HOOKS } from '../src/Table';
import { INTERNAL_HOOKS } from '../src/constant';

// All follow test is only for internal usage which should be removed when refactor
describe('Table.Internal', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/Table.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react';
import Table, { INTERNAL_COL_DEFINE } from '../src';
import BodyRow from '../src/Body/BodyRow';
import Cell from '../src/Cell';
import { INTERNAL_HOOKS } from '../src/Table';
import { INTERNAL_HOOKS } from '../src/constant';

describe('Table.Basic', () => {
const data = [
Expand Down