Skip to content

Commit

Permalink
save function use static (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ authored Oct 18, 2019
1 parent 14de6cb commit 2b7f5fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,10 @@ class Table<ValueType> extends React.Component<TableProps<ValueType>, TableState
this[name] = node;
};

saveTableNodeRef = (node: HTMLDivElement) => {
this.tableNode = node;
};

renderMainTable() {
const { scroll, prefixCls } = this.props;
const isAnyColumnsFixed = this.columnManager.isAnyColumnsFixed();
Expand Down Expand Up @@ -575,7 +579,7 @@ class Table<ValueType> extends React.Component<TableProps<ValueType>, TableState
this.expander = expander;
return (
<div
ref={this.saveRef('tableNode')}
ref={this.saveTableNodeRef}
className={tableClassName}
style={props.style}
id={props.id}
Expand Down

1 comment on commit 2b7f5fe

@vercel
Copy link

@vercel vercel bot commented on 2b7f5fe Oct 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.