({
return React.useMemo(() => {
let contentNode = children;
- if (fixColumn) {
+ if (horizonScroll) {
contentNode = (
({
children,
Component,
fixHeader,
- fixColumn,
+ horizonScroll,
className,
expanded,
componentWidth,
diff --git a/src/Body/index.tsx b/src/Body/index.tsx
index 8646533ad..33fc7252b 100644
--- a/src/Body/index.tsx
+++ b/src/Body/index.tsx
@@ -33,7 +33,9 @@ function Body({
}: BodyProps) {
const { onColumnResize } = React.useContext(ResizeContext);
const { prefixCls, getComponent } = React.useContext(TableContext);
- const { fixHeader, fixColumn, flattenColumns, componentWidth } = React.useContext(BodyContext);
+ const { fixHeader, horizonScroll, flattenColumns, componentWidth } = React.useContext(
+ BodyContext,
+ );
return React.useMemo(() => {
const WrapperComponent = getComponent(['body', 'wrapper'], 'tbody');
@@ -70,7 +72,7 @@ function Body({
className={`${prefixCls}-placeholder`}
prefixCls={prefixCls}
fixHeader={fixHeader}
- fixColumn={fixColumn}
+ horizonScroll={horizonScroll}
component={trComponent}
componentWidth={componentWidth}
cellComponent={tdComponent}
diff --git a/src/Table.tsx b/src/Table.tsx
index ea14b0443..743a0c377 100644
--- a/src/Table.tsx
+++ b/src/Table.tsx
@@ -369,7 +369,7 @@ function Table(props: TableProps pureColWidths, [pureColWidths.join('_')]);
const stickyOffsets = useStickyOffsets(colWidths, flattenColumns.length, direction);
const fixHeader = hasData && scroll && validateValue(scroll.y);
- const fixColumn = scroll && validateValue(scroll.x);
+ const horizonScroll = scroll && validateValue(scroll.x);
let scrollXStyle: React.CSSProperties;
let scrollYStyle: React.CSSProperties;
@@ -382,7 +382,7 @@ function Table(props: TableProps(props: TableProps triggerOnScroll, []);
React.useEffect(() => {
- if (fixColumn) {
+ if (horizonScroll) {
triggerOnScroll();
}
- }, [fixColumn]);
+ }, [horizonScroll]);
// ================== INTERNAL HOOKS ==================
React.useEffect(() => {
@@ -501,7 +501,7 @@ function Table(props: TableProps(props: TableProps(props: TableProps
);
- if (fixColumn) {
+ if (horizonScroll) {
fullTable = {fullTable};
}
@@ -670,7 +670,7 @@ function Table(props: TableProps(props: TableProps {
componentWidth: number;
tableLayout: TableLayout;
fixHeader: boolean;
- fixColumn: boolean;
+ horizonScroll: boolean;
indentSize: number;
expandableType: ExpandableType;