this.domScrollContainer = x} style={this.props.containerStyle}>
+//
this.domScrollContent = x} style={{ width: this.contentSize }}>
+//
+//
+//
;
+// }
+
+// getContainerSize(): number {
+// return $(this.domScrollContainer).width();
+// }
+
+// updateContentSize() {
+// $(this.domScrollContent).width(this.contentSize);
+// }
+
+// getScrollPosition() {
+// return $(this.domScrollContainer).scrollLeft();
+// }
+
+// setScrollPosition(value: number) {
+// $(this.domScrollContainer).scrollLeft(value);
+// }
+// }
+
+// export class VerticalScrollBar extends ScrollBarBase {
+// render() {
+// this.setContentSizeField();
+
+// return this.domScrollContainer = x} style={this.props.containerStyle}>
+//
this.domScrollContent = x} style={{ height: this.contentSize }}>
+//
+//
+//
;
+// }
+
+// getContainerSize(): number {
+// return $(this.domScrollContainer).height();
+// }
+
+// updateContentSize() {
+// $(this.domScrollContent).height(this.contentSize);
+// }
+
+// getScrollPosition() {
+// return $(this.domScrollContainer).scrollTop();
+// }
+
+// setScrollPosition(value: number) {
+// $(this.domScrollContainer).scrollTop(value);
+// }
+// }
diff --git a/web/src/tabs/TableDataTab.js b/web/src/tabs/TableDataTab.js
index cbc27b3e..86c897b1 100644
--- a/web/src/tabs/TableDataTab.js
+++ b/web/src/tabs/TableDataTab.js
@@ -2,109 +2,8 @@ import React from 'react';
import useFetch from '../utility/useFetch';
import styled from 'styled-components';
import theme from '../theme';
-
-// const Table = styled.table`
-// position: absolute;
-// left:0;
-// top:0:
-// bottom:0;
-// right:0;
-// overflow: scroll;
-// `;
-// const TableHead = styled.thead`
-// // display: block;
-// // width: 300px;
-// `;
-// const TableBody = styled.tbody`
-// // display: block;
-// // overflow: auto;
-// // height: 100px;
-// `;
-// const TableHeaderRow = styled.tr`
-// height: 35px;
-// `;
-// const TableBodyRow = styled.tr`
-// height: 35px;
-// `;
-// const TableHeaderCell = styled.td`
-// font-weight: bold;
-// `;
-// const TableBodyCell = styled.td`
-// white-space: nowrap;
-// `;
-
-const Table = styled.div`
- overflow-x: scroll;
- width: 500px;
- position: absolute;
- left:0;
- top:0:
- bottom:0;
- right:0;
-`;
-const TableHead = styled.div`
- // display: block;
- // width: 300px;
- // width:700px;
-`;
-const TableBody = styled.div`
- // display: block;
- overflow-y: scroll;
- height: 200px;
-`;
-const TableHeaderRow = styled.div`
- display: flex;
- height: 35px;
-`;
-const TableBodyRow = styled.div`
- display: flex;
- height: 35px;
-`;
-const TableHeaderCell = styled.div`
- font-weight: bold;
- width: 160px;
- overflow: hidden;
-`;
-const TableBodyCell = styled.div`
- white-space: nowrap;
- width: 160px;
- overflow: hidden;
-`;
+import DataGrid from '../datagrid/DataGrid';
export default function TableDataTab({ conid, database, schemaName, pureName }) {
- const data = useFetch({
- url: 'tables/table-data',
- params: {
- conid,
- database,
- schemaName,
- pureName,
- },
- });
- const { rows, columns } = data || {};
- if (!columns || !rows) return null;
- return (
-