antd-mobile 5.10.0 → 5.10.1

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.
@@ -72,7 +72,7 @@ const Stepper = p => {
72
72
  if (!hasFocus) {
73
73
  setInputValue(convertValueToText(value, props.digits));
74
74
  }
75
- }, [value]);
75
+ }, [value, props.digits]);
76
76
 
77
77
  const handleInputChange = v => {
78
78
  setInputValue(v);
@@ -129,6 +129,7 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
129
129
  },
130
130
  onRest: () => {
131
131
  if (draggingRef.current) return;
132
+ if (!loop) return;
132
133
  const rawX = position.get();
133
134
  const totalWidth = 100 * count;
134
135
  const standardPosition = modulus(rawX, totalWidth);
@@ -48,7 +48,7 @@ export const Stepper = p => {
48
48
  if (!hasFocus) {
49
49
  setInputValue(convertValueToText(value, props.digits));
50
50
  }
51
- }, [value]);
51
+ }, [value, props.digits]);
52
52
 
53
53
  const handleInputChange = v => {
54
54
  setInputValue(v);
@@ -101,6 +101,7 @@ export const Swiper = forwardRef(staged((p, ref) => {
101
101
  },
102
102
  onRest: () => {
103
103
  if (draggingRef.current) return;
104
+ if (!loop) return;
104
105
  const rawX = position.get();
105
106
  const totalWidth = 100 * count;
106
107
  const standardPosition = modulus(rawX, totalWidth);
package/2x/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-mobile",
3
- "version": "5.10.0",
3
+ "version": "5.10.1",
4
4
  "dependencies": {
5
5
  "@floating-ui/dom": "^0.4.2",
6
6
  "@react-spring/web": "^9.4.4",
@@ -16328,7 +16328,7 @@ const Stepper = (p) => {
16328
16328
  if (!hasFocus) {
16329
16329
  setInputValue(convertValueToText(value, props.digits));
16330
16330
  }
16331
- }, [value]);
16331
+ }, [value, props.digits]);
16332
16332
  const handleInputChange = (v) => {
16333
16333
  setInputValue(v);
16334
16334
  const value2 = convertTextToValue(v);
@@ -16756,6 +16756,8 @@ const Swiper = React$1.forwardRef(stagedComponents.staged((p, ref) => {
16756
16756
  onRest: () => {
16757
16757
  if (draggingRef.current)
16758
16758
  return;
16759
+ if (!loop)
16760
+ return;
16759
16761
  const rawX = position.get();
16760
16762
  const totalWidth = 100 * count;
16761
16763
  const standardPosition = modulus(rawX, totalWidth);
@@ -16318,7 +16318,7 @@ const Stepper = (p) => {
16318
16318
  if (!hasFocus) {
16319
16319
  setInputValue(convertValueToText(value, props.digits));
16320
16320
  }
16321
- }, [value]);
16321
+ }, [value, props.digits]);
16322
16322
  const handleInputChange = (v) => {
16323
16323
  setInputValue(v);
16324
16324
  const value2 = convertTextToValue(v);
@@ -16746,6 +16746,8 @@ const Swiper = forwardRef(staged((p, ref) => {
16746
16746
  onRest: () => {
16747
16747
  if (draggingRef.current)
16748
16748
  return;
16749
+ if (!loop)
16750
+ return;
16749
16751
  const rawX = position.get();
16750
16752
  const totalWidth = 100 * count;
16751
16753
  const standardPosition = modulus(rawX, totalWidth);
@@ -72,7 +72,7 @@ const Stepper = p => {
72
72
  if (!hasFocus) {
73
73
  setInputValue(convertValueToText(value, props.digits));
74
74
  }
75
- }, [value]);
75
+ }, [value, props.digits]);
76
76
 
77
77
  const handleInputChange = v => {
78
78
  setInputValue(v);
@@ -129,6 +129,7 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
129
129
  },
130
130
  onRest: () => {
131
131
  if (draggingRef.current) return;
132
+ if (!loop) return;
132
133
  const rawX = position.get();
133
134
  const totalWidth = 100 * count;
134
135
  const standardPosition = modulus(rawX, totalWidth);
@@ -48,7 +48,7 @@ export const Stepper = p => {
48
48
  if (!hasFocus) {
49
49
  setInputValue(convertValueToText(value, props.digits));
50
50
  }
51
- }, [value]);
51
+ }, [value, props.digits]);
52
52
 
53
53
  const handleInputChange = v => {
54
54
  setInputValue(v);
@@ -101,6 +101,7 @@ export const Swiper = forwardRef(staged((p, ref) => {
101
101
  },
102
102
  onRest: () => {
103
103
  if (draggingRef.current) return;
104
+ if (!loop) return;
104
105
  const rawX = position.get();
105
106
  const totalWidth = 100 * count;
106
107
  const standardPosition = modulus(rawX, totalWidth);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-mobile",
3
- "version": "5.10.0",
3
+ "version": "5.10.1",
4
4
  "dependencies": {
5
5
  "@floating-ui/dom": "^0.4.2",
6
6
  "@react-spring/web": "^9.4.4",