Skip to content

Commit 465515b

Browse files
committed
Fixed scrollTop bug
Fixed ScrollTop bug Auto stash before rebase of "origin/master"
1 parent ce7935f commit 465515b

File tree

7 files changed

+16
-65
lines changed

7 files changed

+16
-65
lines changed

package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"sass-loader": "^7.0.1",
5555
"styled-components": "^4.1.2",
5656
"tslint-config-prettier": "^1.15.0",
57-
"typescript": "^3.5.3",
57+
"typescript": "^3.4.5",
5858
"typescript-styled-plugin": "^0.13.0"
5959
},
6060
"scripts": {
@@ -63,7 +63,6 @@
6363
"docs": "react-app-rewired build --scripts-version react-scripts-ts && rimraf ./docs && mv build ./docs && ncp ./src/CNAME ./docs/CNAME && ncp ./src/404.html ./docs/404.html && git add -A",
6464
"test": "NODE_ENV=test jest",
6565
"test-watch": "NODE_ENV=test jest --watch",
66-
"tslint-check": "tslint-config-prettier-check ./tslint.json",
6766
"prepublish": "npm run build",
6867
"publish:patch": "cd src && npm version patch && cd .. && node ./scripts/syncVersion.js && npm run docs",
6968
"publish:minor": "cd src && npm version minor && cd .. && node ./scripts/syncVersion.js && npm run docs"

src/@types/console/index.d.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
declare module 'console' {
2+
export = typeof import('console');
3+
}

src/axui-datagrid/providers/StoreProvider.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ class StoreProvider extends React.Component<
260260
nProps.height !== nState.height
261261
) {
262262
// 스타일 초기화 안되어 있거나 크기를 다시 결정해야 하는 경우.
263+
storeState.scrollTop = nProps.scrollTop;
264+
storeState.scrollLeft = nProps.scrollLeft;
265+
263266
const dimensions = calculateDimensions(storeState, {
264267
headerTable: nProps.headerTable,
265268
colGroup: _colGroup,
@@ -269,6 +272,7 @@ class StoreProvider extends React.Component<
269272
dataLength: nProps.dataLength,
270273
options: nProps.options,
271274
});
275+
272276
_styles = dimensions.styles;
273277
_scrollTop = dimensions.scrollTop;
274278
_scrollLeft = dimensions.scrollLeft;
@@ -309,6 +313,7 @@ class StoreProvider extends React.Component<
309313
scrollContentContainerWidth = 0,
310314
scrollContentContainerHeight = 0,
311315
} = _styles || {};
316+
312317
let {
313318
scrollLeft: _currScrollLeft = 0,
314319
scrollTop: _currScrollTop = 0,

src/examples/RowSelector.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ class LoadingState extends React.Component<any, IState> {
117117
showRowSelector: true,
118118
rowSelectorSize: 16,
119119
}}
120+
scrollTop={-100}
120121
onSelect={this.onSelect}
121122
/>
122123
</div>

tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"noImplicitThis": true,
1616
"noImplicitAny": true,
1717
"strictNullChecks": true,
18-
"skipLibCheck": true,
1918
"suppressImplicitAnyIndexErrors": true,
2019
"noUnusedLocals": false,
2120
"noUnusedParameters": false,

tslint.json

+3-59
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,5 @@
11
{
2-
"defaultSeverity": "warn",
3-
"extends": ["tslint-react", "tslint-config-prettier"],
4-
"rules": {
5-
"ban": false,
6-
"class-name": true,
7-
"curly": true,
8-
"eofline": false,
9-
"forin": true,
10-
"interface-name": [true, "always-prefix"],
11-
"jsx-no-lambda": false,
12-
"jsx-no-multiline-js": false,
13-
"label-position": true,
14-
"max-line-length": false,
15-
"member-ordering": [
16-
true,
17-
{
18-
"order": [
19-
"public-static-field",
20-
"public-instance-field",
21-
"public-constructor",
22-
"private-static-field",
23-
"private-instance-field",
24-
"private-constructor",
25-
"public-instance-method",
26-
"protected-instance-method",
27-
"private-instance-method"
28-
]
29-
}
30-
],
31-
"no-any": false,
32-
"no-arg": true,
33-
"no-bitwise": true,
34-
"no-console": [true, "error", "debug", "info", "time", "timeEnd", "trace"],
35-
"no-construct": true,
36-
"no-debugger": false,
37-
"no-duplicate-variable": true,
38-
"no-empty": false,
39-
"no-eval": true,
40-
"no-string-literal": false,
41-
"no-switch-case-fall-through": true,
42-
"no-trailing-whitespace": false,
43-
"no-unused-expression": false,
44-
"no-unused-variable": false,
45-
"no-use-before-declare": false,
46-
"radix": true,
47-
"semicolon": false,
48-
"switch-default": true,
49-
"trailing-comma": [false],
50-
"triple-equals": [true, "allow-null-check"],
51-
"typedef": [true, "parameter", "property-declaration"],
52-
"variable-name": [
53-
true,
54-
"ban-keywords",
55-
"check-format",
56-
"allow-leading-underscore",
57-
"allow-pascal-case"
58-
],
59-
"jsx-boolean-value": false
60-
}
2+
"defaultSeverity": "off",
3+
"extends": [],
4+
"rules": {}
615
}

0 commit comments

Comments
 (0)