Skip to content

Commit f680aae

Browse files
author
JelteMX
committed
UI fix
1 parent 5b9a580 commit f680aae

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

src/DynamicTable.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ class DynamicTable extends Component<DynamicTableContainerProps> {
8686
// }
8787

8888
componentWillReceiveProps(nextProps: DynamicTableContainerProps): void {
89-
9089
if (!this.widgetId && this.ref.current) {
9190
try {
9291
const domNode = findDOMNode(this);
@@ -120,7 +119,7 @@ class DynamicTable extends Component<DynamicTableContainerProps> {
120119
}
121120

122121
return (
123-
<div ref={this.ref} style={{height: "100%"}}>
122+
<div ref={this.ref} style={{ height: "100%" }}>
124123
<DynamicTreeTableContainer
125124
store={this.store}
126125
selectMode={selectionMode}

src/components/DynamicTreeTableContainer.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ export class DynamicTreeTableContainer extends Component<DynamicTreeTableContain
8787

8888
const scrollY = ui.settingsTableLockHeaderRow ? ui.settingsHeight || true : false;
8989

90-
console.log(scrollY);
91-
9290
const containerIfNotDisabled = store.disabled ? null : (
9391
<Fragment>
9492
<SizeContainer
@@ -107,7 +105,7 @@ export class DynamicTreeTableContainer extends Component<DynamicTreeTableContain
107105
rowSelection={rowSelection}
108106
pagination={false}
109107
rowClassName={this.onRowClassName}
110-
scroll={{ x: store.width || true, y: scrollY ? "100%" : "100%" }}
108+
// scroll={{ x: store.width || true, y: scrollY ? "100%" : "100%" }}
111109
size="small"
112110
/>
113111
<ReactResizeDetector

src/components/SizeContainer.tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,20 @@ const getHeight = (heightUnit: HeightUnitType, height: number): CSSProperties =>
4343
};
4444

4545
export const SizeContainer = ({
46-
className,
47-
widthUnit,
48-
width,
49-
heightUnit,
50-
height,
51-
children,
52-
style
53-
}: PropsWithChildren<SizeProps>): JSX.Element => {
54-
const styleWidth = widthUnit === "percentage" ? `${width}%` : `${width}px`;
46+
className,
47+
widthUnit,
48+
width,
49+
heightUnit,
50+
height,
51+
children,
52+
style
53+
}: PropsWithChildren<SizeProps>): JSX.Element => {
54+
const styleWidth = widthUnit === "percentage" ? `${width}%` : `${width}px`;
5555

56-
return (<div
56+
return (
57+
<div
5758
className={classNames((className || "dynamic-table") + "__size-box")}
58-
style= {{
59+
style={{
5960
position: "relative",
6061
width: styleWidth,
6162
...getHeight(heightUnit, height),
@@ -75,5 +76,6 @@ export const SizeContainer = ({
7576
>
7677
{children}
7778
</div>
78-
</div>);
79-
}
79+
</div>
80+
);
81+
};

src/store/objects/abstract/table-object.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class TableObject {
3737

3838
fixTitle = flow(function*(this: TableObject) {
3939
if (this._titleMethod) {
40-
const title = yield this._titleMethod(this._obj);
40+
const title: string = yield this._titleMethod(this._obj);
4141
this._title = title;
4242
}
4343
});

src/ui/DynamicTable.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
@import "~antd/es/pagination/style/index.css";
88

99
.widget-dynamictable-wrapper {
10+
1011
.size-box-inner {
1112
overflow-x: hidden;
1213
overflow-y: auto;

0 commit comments

Comments
 (0)