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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # bhd-components
2
2
 
3
- **当前版本:** 0.9.7
3
+ **当前版本:** 0.9.8
4
4
 
5
5
  ## Install
6
6
 
@@ -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 = scrollObject ? scrollObject : {};
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), {