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.esm.js
CHANGED
|
@@ -208,11 +208,17 @@ function createGridComponent(_ref2) {
|
|
|
208
208
|
if (itemStyleCache.hasOwnProperty(key)) {
|
|
209
209
|
style = itemStyleCache[key];
|
|
210
210
|
} else {
|
|
211
|
-
var
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
211
|
+
var _offset = getColumnOffset(_this.props, columnIndex, _this._instanceProps);
|
|
212
|
+
|
|
213
|
+
var isRtl = direction === 'rtl';
|
|
214
|
+
itemStyleCache[key] = style = {
|
|
215
|
+
position: 'absolute',
|
|
216
|
+
left: isRtl ? undefined : _offset,
|
|
217
|
+
right: isRtl ? _offset : undefined,
|
|
218
|
+
top: getRowOffset(_this.props, rowIndex, _this._instanceProps),
|
|
219
|
+
height: getRowHeight(_this.props, rowIndex, _this._instanceProps),
|
|
220
|
+
width: getColumnWidth(_this.props, columnIndex, _this._instanceProps)
|
|
221
|
+
};
|
|
216
222
|
}
|
|
217
223
|
|
|
218
224
|
return style;
|
|
@@ -1099,16 +1105,21 @@ function createListComponent(_ref) {
|
|
|
1099
1105
|
if (itemStyleCache.hasOwnProperty(index)) {
|
|
1100
1106
|
style = itemStyleCache[index];
|
|
1101
1107
|
} else {
|
|
1102
|
-
var _style;
|
|
1103
|
-
|
|
1104
1108
|
var _offset = getItemOffset(_this.props, index, _this._instanceProps);
|
|
1105
1109
|
|
|
1106
1110
|
var size = getItemSize(_this.props, index, _this._instanceProps); // TODO Deprecate direction "horizontal"
|
|
1107
1111
|
|
|
1108
1112
|
var isHorizontal = direction === 'horizontal' || layout === 'horizontal';
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1113
|
+
var isRtl = direction === 'rtl';
|
|
1114
|
+
var offsetHorizontal = isHorizontal ? _offset : 0;
|
|
1115
|
+
itemStyleCache[index] = style = {
|
|
1116
|
+
position: 'absolute',
|
|
1117
|
+
left: isRtl ? undefined : offsetHorizontal,
|
|
1118
|
+
right: isRtl ? offsetHorizontal : undefined,
|
|
1119
|
+
top: !isHorizontal ? _offset : 0,
|
|
1120
|
+
height: !isHorizontal ? size : '100%',
|
|
1121
|
+
width: isHorizontal ? size : '100%'
|
|
1122
|
+
};
|
|
1112
1123
|
}
|
|
1113
1124
|
|
|
1114
1125
|
return style;
|