atlas-design-system 1.17.1 → 1.17.2

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.
@@ -43,6 +43,7 @@ function SelectInput({ caption, label, options = [], onChange, error, renderOpti
43
43
  return options.find((v) => v.selected);
44
44
  }, [options]);
45
45
  const [sheetOpen, setSheetOpen] = (0, react_1.useState)(false);
46
+ const isInitialMount = (0, react_1.useRef)(true);
46
47
  const animatedValue = (0, react_native_reanimated_1.useSharedValue)(value ? 1 : 0);
47
48
  const { animatedBorderStyle, setBorderColor } = (0, useInputFieldAnimatedBorder_1.useInputFieldAnimatedBorder)(styles.itemContainer.borderColor);
48
49
  (0, react_1.useEffect)(() => {
@@ -60,7 +61,15 @@ function SelectInput({ caption, label, options = [], onChange, error, renderOpti
60
61
  styles.itemContainer.borderColor,
61
62
  ]);
62
63
  (0, react_1.useEffect)(() => {
63
- animatedValue.value = (0, react_native_reanimated_1.withTiming)(value ? 1 : 0, { duration: 250 });
64
+ if (isInitialMount.current) {
65
+ // skip animation on initial mount we already have the value
66
+ isInitialMount.current = false;
67
+ return;
68
+ }
69
+ else {
70
+ // After initial mount, animate the value changes
71
+ animatedValue.value = (0, react_native_reanimated_1.withTiming)(value ? 1 : 0, { duration: 250 });
72
+ }
64
73
  }, [value]);
65
74
  const animatedLabelStyles = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
66
75
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atlas-design-system",
3
- "version": "1.17.1",
3
+ "version": "1.17.2",
4
4
  "description": "A react native design system for the Atlas workout app",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",