react-window 1.8.5 → 1.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-window",
3
- "version": "1.8.5",
3
+ "version": "1.8.6",
4
4
  "description":
5
5
  "React components for efficiently rendering large, scrollable lists and tabular data",
6
6
  "author":
@@ -37,6 +37,7 @@
37
37
  "main": "dist/index.cjs.js",
38
38
  "module": "dist/index.esm.js",
39
39
  "files": ["dist", "src/*.js"],
40
+ "sideEffects": false,
40
41
  "scripts": {
41
42
  "flow": "flow check --max-warnings=0 src && flow check website",
42
43
  "precommit": "lint-staged",
@@ -64,8 +65,8 @@
64
65
  "memoize-one": ">=3.1.1 <6"
65
66
  },
66
67
  "peerDependencies": {
67
- "react": "^15.0.0 || ^16.0.0",
68
- "react-dom": "^15.0.0 || ^16.0.0"
68
+ "react": "^15.0.0 || ^16.0.0 || ^17.0.0",
69
+ "react-dom": "^15.0.0 || ^16.0.0 || ^17.0.0"
69
70
  },
70
71
  "devDependencies": {
71
72
  "@babel/core": "^7.0.0",
@@ -91,15 +92,15 @@
91
92
  "eslint-plugin-promise": "^3.7.0",
92
93
  "eslint-plugin-react": "^7.7.0",
93
94
  "eslint-plugin-standard": "^3.0.1",
94
- "flow-bin": "^0.101.0",
95
+ "flow-bin": "^0.111.0",
95
96
  "gh-pages": "^1.1.0",
96
97
  "lint-staged": "^7.0.5",
97
98
  "prettier": "^1.12.1",
98
- "react": "^16.8.4",
99
- "react-dom": "^16.8.4",
100
- "react-is": "^16.8.4",
99
+ "react": "^17.0.1",
100
+ "react-dom": "^17.0.1",
101
+ "react-is": "^17.0.1",
101
102
  "react-scripts": "^1.1.1",
102
- "react-test-renderer": "^16.7.0",
103
+ "react-test-renderer": "^17.0.1",
103
104
  "rollup": "^1.4.1",
104
105
  "rollup-plugin-babel": "^4.3.2",
105
106
  "rollup-plugin-commonjs": "^9.2.1",
@@ -610,13 +610,16 @@ export default function createGridComponent({
610
610
  if (itemStyleCache.hasOwnProperty(key)) {
611
611
  style = itemStyleCache[key];
612
612
  } else {
613
+ const offset = getColumnOffset(
614
+ this.props,
615
+ columnIndex,
616
+ this._instanceProps
617
+ );
618
+ const isRtl = direction === 'rtl';
613
619
  itemStyleCache[key] = style = {
614
620
  position: 'absolute',
615
- [direction === 'rtl' ? 'right' : 'left']: getColumnOffset(
616
- this.props,
617
- columnIndex,
618
- this._instanceProps
619
- ),
621
+ left: isRtl ? undefined : offset,
622
+ right: isRtl ? offset : undefined,
620
623
  top: getRowOffset(this.props, rowIndex, this._instanceProps),
621
624
  height: getRowHeight(this.props, rowIndex, this._instanceProps),
622
625
  width: getColumnWidth(this.props, columnIndex, this._instanceProps),
@@ -466,9 +466,12 @@ export default function createListComponent({
466
466
  const isHorizontal =
467
467
  direction === 'horizontal' || layout === 'horizontal';
468
468
 
469
+ const isRtl = direction === 'rtl';
470
+ const offsetHorizontal = isHorizontal ? offset : 0;
469
471
  itemStyleCache[index] = style = {
470
472
  position: 'absolute',
471
- [direction === 'rtl' ? 'right' : 'left']: isHorizontal ? offset : 0,
473
+ left: isRtl ? undefined : offsetHorizontal,
474
+ right: isRtl ? offsetHorizontal : undefined,
472
475
  top: !isHorizontal ? offset : 0,
473
476
  height: !isHorizontal ? size : '100%',
474
477
  width: isHorizontal ? size : '100%',