Explorar el Código

fix: 表格bug

Leo hace 1 año
padre
commit
b9937967d8

+ 1 - 1
packages/yili-dag/src/Dag.tsx

@@ -981,7 +981,7 @@ export default class Dag extends React.Component<any, any> {
             columns={this.state.nodeTableCol}
             dataSource={this.state.nodeTableData}
             pagination={{ pageSize: 20 }}
-            scroll={{ x: this.state.nodeTableCol * 250, y: 450 }}
+            scroll={{ x: this.state.nodeTableCol.length * 250, y: 450 }}
           />
         </Modal>
         <Modal

+ 1 - 1
packages/yili-dag/src/MediateDataInfo.tsx

@@ -96,7 +96,7 @@ export default class ToolBar extends React.Component<any, any> {
           columns={this.state.columns}
           dataSource={this.state.tableData}
           pagination={{ pageSize: 50 }}
-          scroll={{ x: this.state.columns * 250, y: 250 }}
+          scroll={{ x: this.state.columns.length * 250, y: 250 }}
         />
       </div>
     );

+ 4 - 1
packages/yili-dag/src/ScriptNodeInfo.tsx

@@ -396,7 +396,10 @@ export default class ScriptNodeInfo extends React.Component<any, any> {
                           bordered
                           columns={this.state.columns}
                           dataSource={this.state.tableData}
-                          scroll={{ x: this.state.columns * 250, y: 400 }}
+                          scroll={{
+                            x: this.state.columns.length * 250,
+                            y: 400
+                          }}
                           pagination={{ showSizeChanger: false }}
                         />
                       </div>