@rfkit/charts 1.1.35 → 1.1.36

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.
Files changed (2) hide show
  1. package/index.js +9 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -6895,8 +6895,13 @@ const GuageBox = ({ children, padding, limit, step, setLimit, onChange })=>{
6895
6895
  toLimit
6896
6896
  ]);
6897
6897
  const handleMouseUpOrLeave = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
6898
+ if (down) onChange?.(limit);
6898
6899
  setDown(false);
6899
- }, []);
6900
+ }, [
6901
+ down,
6902
+ limit,
6903
+ onChange
6904
+ ]);
6900
6905
  const handleMouseMove = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
6901
6906
  if (down) toLimit(e);
6902
6907
  }, [
@@ -6907,17 +6912,14 @@ const GuageBox = ({ children, padding, limit, step, setLimit, onChange })=>{
6907
6912
  let newLimit = limit + (e.deltaY > 0 ? -step : step);
6908
6913
  newLimit = Math.max(min, Math.min(max, newLimit));
6909
6914
  setLimit(newLimit);
6915
+ onChange?.(newLimit);
6910
6916
  }, [
6911
6917
  step,
6912
6918
  limit,
6913
6919
  min,
6914
6920
  max,
6915
- setLimit
6916
- ]);
6917
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
6918
- onChange?.(limit);
6919
- }, [
6920
- limit
6921
+ setLimit,
6922
+ onChange
6921
6923
  ]);
6922
6924
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
6923
6925
  className: components_GuageBox_styles_module.GuageBox,
package/package.json CHANGED
@@ -5,6 +5,6 @@
5
5
  "types": "index.d.ts",
6
6
  "author": "Hxgh",
7
7
  "license": "MIT",
8
- "version": "1.1.35",
8
+ "version": "1.1.36",
9
9
  "private": false
10
10
  }