@sheinx/hooks 3.3.7-beta.6 → 3.3.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"use-transform.d.ts","sourceRoot":"","sources":["use-transform.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,QAAA,MAAM,YAAY,aAAc,iBAAiB;;;;;;;;8BAwBd,MAAM;;;CAsFxC,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"use-transform.d.ts","sourceRoot":"","sources":["use-transform.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,QAAA,MAAM,YAAY,aAAc,iBAAiB;;;;;;;;8BAwBd,MAAM;;;CA0FxC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -116,13 +116,17 @@ var useTransform = function useTransform(props) {
116
116
  setAtStart(true);
117
117
  }
118
118
  var removeWheelListener;
119
+ var removeScrollerListener;
119
120
  if (autoScroll) {
120
121
  var removeMouse = shouldScroll ? (0, _scrollBehavior.banOverScrollx)(container) : null;
121
122
  removeWheelListener = (0, _element.addResizeObserver)(container, handleResize);
123
+ // 同时需要监听tabs-header-scroll的resize事件,防止tabs-header-scroll的宽度变化后不出现左右箭头的问题
124
+ removeScrollerListener = (0, _element.addResizeObserver)(target, handleResize);
122
125
  return function () {
123
- var _removeWheelListener;
126
+ var _removeWheelListener, _removeScrollerListen;
124
127
  removeMouse === null || removeMouse === void 0 || removeMouse();
125
128
  (_removeWheelListener = removeWheelListener) === null || _removeWheelListener === void 0 || _removeWheelListener();
129
+ (_removeScrollerListen = removeScrollerListener) === null || _removeScrollerListen === void 0 || _removeScrollerListen();
126
130
  };
127
131
  }
128
132
  }, [containerRef.current, targetRef.current, shouldScroll]);
@@ -1 +1 @@
1
- {"version":3,"file":"use-transform.d.ts","sourceRoot":"","sources":["use-transform.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,QAAA,MAAM,YAAY,aAAc,iBAAiB;;;;;;;;8BAwBd,MAAM;;;CAsFxC,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"use-transform.d.ts","sourceRoot":"","sources":["use-transform.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,QAAA,MAAM,YAAY,aAAc,iBAAiB;;;;;;;;8BAwBd,MAAM;;;CA0FxC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -110,13 +110,17 @@ var useTransform = function useTransform(props) {
110
110
  setAtStart(true);
111
111
  }
112
112
  var removeWheelListener;
113
+ var removeScrollerListener;
113
114
  if (autoScroll) {
114
115
  var removeMouse = shouldScroll ? banOverScrollx(container) : null;
115
116
  removeWheelListener = addResizeObserver(container, handleResize);
117
+ // 同时需要监听tabs-header-scroll的resize事件,防止tabs-header-scroll的宽度变化后不出现左右箭头的问题
118
+ removeScrollerListener = addResizeObserver(target, handleResize);
116
119
  return function () {
117
- var _removeWheelListener;
120
+ var _removeWheelListener, _removeScrollerListen;
118
121
  removeMouse === null || removeMouse === void 0 || removeMouse();
119
122
  (_removeWheelListener = removeWheelListener) === null || _removeWheelListener === void 0 || _removeWheelListener();
123
+ (_removeScrollerListen = removeScrollerListener) === null || _removeScrollerListen === void 0 || _removeScrollerListen();
120
124
  };
121
125
  }
122
126
  }, [containerRef.current, targetRef.current, shouldScroll]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/hooks",
3
- "version": "3.3.7-beta.6",
3
+ "version": "3.3.7",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",