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/CHANGELOG.md +3 -0
- package/README.md +5 -0
- package/dist/index-dev.umd.js +1 -1
- package/dist/index-dev.umd.js.map +1 -1
- package/dist/index-prod.umd.js +1 -1
- package/dist/index-prod.umd.js.map +1 -1
- package/dist/index.cjs.js +21 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +21 -10
- package/dist/index.esm.js.map +1 -1
- package/package.json +9 -8
- package/src/createGridComponent.js +8 -5
- package/src/createListComponent.js +4 -1
package/dist/index.cjs.js
CHANGED
|
@@ -214,11 +214,17 @@ function createGridComponent(_ref2) {
|
|
|
214
214
|
if (itemStyleCache.hasOwnProperty(key)) {
|
|
215
215
|
style = itemStyleCache[key];
|
|
216
216
|
} else {
|
|
217
|
-
var
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
217
|
+
var _offset = getColumnOffset(_this.props, columnIndex, _this._instanceProps);
|
|
218
|
+
|
|
219
|
+
var isRtl = direction === 'rtl';
|
|
220
|
+
itemStyleCache[key] = style = {
|
|
221
|
+
position: 'absolute',
|
|
222
|
+
left: isRtl ? undefined : _offset,
|
|
223
|
+
right: isRtl ? _offset : undefined,
|
|
224
|
+
top: getRowOffset(_this.props, rowIndex, _this._instanceProps),
|
|
225
|
+
height: getRowHeight(_this.props, rowIndex, _this._instanceProps),
|
|
226
|
+
width: getColumnWidth(_this.props, columnIndex, _this._instanceProps)
|
|
227
|
+
};
|
|
222
228
|
}
|
|
223
229
|
|
|
224
230
|
return style;
|
|
@@ -1105,16 +1111,21 @@ function createListComponent(_ref) {
|
|
|
1105
1111
|
if (itemStyleCache.hasOwnProperty(index)) {
|
|
1106
1112
|
style = itemStyleCache[index];
|
|
1107
1113
|
} else {
|
|
1108
|
-
var _style;
|
|
1109
|
-
|
|
1110
1114
|
var _offset = getItemOffset(_this.props, index, _this._instanceProps);
|
|
1111
1115
|
|
|
1112
1116
|
var size = getItemSize(_this.props, index, _this._instanceProps); // TODO Deprecate direction "horizontal"
|
|
1113
1117
|
|
|
1114
1118
|
var isHorizontal = direction === 'horizontal' || layout === 'horizontal';
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1119
|
+
var isRtl = direction === 'rtl';
|
|
1120
|
+
var offsetHorizontal = isHorizontal ? _offset : 0;
|
|
1121
|
+
itemStyleCache[index] = style = {
|
|
1122
|
+
position: 'absolute',
|
|
1123
|
+
left: isRtl ? undefined : offsetHorizontal,
|
|
1124
|
+
right: isRtl ? offsetHorizontal : undefined,
|
|
1125
|
+
top: !isHorizontal ? _offset : 0,
|
|
1126
|
+
height: !isHorizontal ? size : '100%',
|
|
1127
|
+
width: isHorizontal ? size : '100%'
|
|
1128
|
+
};
|
|
1118
1129
|
}
|
|
1119
1130
|
|
|
1120
1131
|
return style;
|