mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-04 13:09:07 +08:00
Table 列固定更新问题优化
This commit is contained in:
parent
46c9c54116
commit
544d9ebd4f
@ -165,7 +165,6 @@ export class ImageField extends React.Component<ImageFieldProps, object> {
|
||||
placeholder,
|
||||
originalSrc,
|
||||
enlargeAble,
|
||||
onEnlarge,
|
||||
showDimensions
|
||||
} = this.props;
|
||||
|
||||
|
@ -171,7 +171,7 @@ export default class Table extends React.Component<TableProps, object> {
|
||||
this.affixDetect = this.affixDetect.bind(this);
|
||||
this.updateTableInfoLazy = debounce(this.updateTableInfo.bind(this), 250, {
|
||||
trailing: true,
|
||||
leading: false
|
||||
leading: true
|
||||
});
|
||||
this.tableRef = this.tableRef.bind(this);
|
||||
this.affixedTableRef = this.affixedTableRef.bind(this);
|
||||
@ -341,6 +341,10 @@ export default class Table extends React.Component<TableProps, object> {
|
||||
}
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
this.updateTableInfoLazy();
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
const parent = this.parentNode;
|
||||
parent && parent.removeEventListener('scroll', this.affixDetect);
|
||||
|
Loading…
Reference in New Issue
Block a user