bhd-components 0.9.7 → 0.9.8
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/README.md +1 -1
- package/dist/index.esm.es5.development.js +7 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/dist/vendor.esm.es5.development.js +6 -1
- package/dist/vendor.esm.es5.production.js +3 -3
- package/es2017/table/index.js +7 -1
- package/esm/table/index.js +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -211,6 +211,7 @@ var Table = function(props) {
|
|
|
211
211
|
var timerRef = useRef({
|
|
212
212
|
timer: null
|
|
213
213
|
});
|
|
214
|
+
var scrollObjectRef = useRef(null);
|
|
214
215
|
var _props_defaultWidthRang = props.defaultWidthRang, defaultWidthRang = _props_defaultWidthRang === void 0 ? [
|
|
215
216
|
180,
|
|
216
217
|
240,
|
|
@@ -233,7 +234,7 @@ var Table = function(props) {
|
|
|
233
234
|
}
|
|
234
235
|
var _initColumnsWidth = initColumnsWidth(props.columns, tableWidth), selfColumns = _initColumnsWidth.columns;
|
|
235
236
|
setColumns(selfColumns);
|
|
236
|
-
var obj =
|
|
237
|
+
var obj = scrollObjectRef.current ? scrollObjectRef.current : {};
|
|
237
238
|
obj = _object_spread_props(_object_spread({}, obj), {
|
|
238
239
|
x: tableWidth
|
|
239
240
|
});
|
|
@@ -386,6 +387,11 @@ var Table = function(props) {
|
|
|
386
387
|
}, [
|
|
387
388
|
props.scroll
|
|
388
389
|
]);
|
|
390
|
+
useEffect(function() {
|
|
391
|
+
scrollObjectRef.current = scrollObject;
|
|
392
|
+
}, [
|
|
393
|
+
scrollObject
|
|
394
|
+
]);
|
|
389
395
|
var config = _object_spread_props(_object_spread({
|
|
390
396
|
bordered: false
|
|
391
397
|
}, props), {
|