Commit f2fbe67d authored by zhangwenshuai's avatar zhangwenshuai

兼容分页

parent cd9565a6
......@@ -6,14 +6,12 @@
flex-direction: row;
border: 1px solid @borderColor;
overflow: hidden;
&.scroll {
height: 100%;
.loading {
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
z-index: 10;
}
height: 100%;
.loading {
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
z-index: 10;
}
.leftSideContainer {
box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.15);
......
......@@ -449,13 +449,9 @@ export default class AirTable extends Component<TableProps, TableState> {
{({ onScroll, scrollLeft, scrollTop }: any) => {
return (
<div
className={
this.props.onScroll
? classNames(styles.tableContainer, styles.scroll)
: styles.tableContainer
}
className={styles.tableContainer}
style={{
paddingRight: this.props.onScroll ? paddingRight : 0,
paddingRight,
}}
id={`apolloTable_${tableId}`}
>
......
@import '../common';
.container {
//overflow: hidden;
//height: 100%;
width: 100%;
position: relative;
&.scroll {
display: flex;
flex-direction: column;
height: calc(100vh - 92px);
}
display: flex;
flex-direction: column;
height: calc(100vh - 92px);
.operateContainer {
}
.tableContainer {
position: relative;
box-shadow: @boxShadow;
//min-height: 600px;
&.scroll {
flex: 1;
display: flex;
flex-direction: column;
}
flex: 1;
display: flex;
flex-direction: column;
.tableOperateContainer {
height: 38px;
overflow: hidden;
......
......@@ -102,19 +102,11 @@ class AirTable extends React.Component<CommonProps, CommonState> {
return (
<Provider value={{ locale: this.getContext() }}>
<div
className={
onScroll
? classNames(styles.container, styles.scroll, className)
: classNames(styles.container, className)
}
className={classNames(styles.container, className)}
>
{operateConfig && <OperateConfig columns={columns} operateConfig={operateConfig} />}
<div
className={
onScroll
? classNames(styles.tableContainer, styles.scroll, tableClassName)
: classNames(styles.tableContainer, tableClassName)
}
className={classNames(styles.tableContainer, tableClassName)}
>
{tableOperateConfig && (
<div className={styles.tableOperateContainer}>
......@@ -128,7 +120,7 @@ class AirTable extends React.Component<CommonProps, CommonState> {
dataSource={dataSource}
rowStyle={rowStyle}
rowClassName={rowClassName}
onScroll={this.onScroll}
onScroll={onScroll ? this.onScroll : undefined}
distanceToLoad={distanceToLoad}
cellEditable={cellEditable}
emitChangeCell={emitChangeCell}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment