react-native-toast-message 2.1.3 → 2.1.4

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/CHANGELOG.md CHANGED
@@ -9,6 +9,12 @@ Headers are one of:
9
9
 
10
10
  - `Added`, `Changed`, `Removed`, `Fixed` or `Breaking`.
11
11
 
12
+ ## [2.1.4]
13
+
14
+ ### Fixed
15
+
16
+ - fix: delay after keyboard is dismissed by [rcb4t2](https://github.com/rcb4t2) in [#342](https://github.com/calintamas/react-native-toast-message/pull/342)
17
+
12
18
  ## [2.1.3]
13
19
 
14
20
  ### Fixed
@@ -20,7 +20,7 @@ export function useSlideAnimation({ position, height, topOffset, bottomOffset, k
20
20
  friction: 8
21
21
  }).start();
22
22
  }, []);
23
- const translateY = animatedValue.current.interpolate({
23
+ const translateY = React.useMemo(() => animatedValue.current.interpolate({
24
24
  inputRange: [0, 1],
25
25
  outputRange: translateYOutputRangeFor({
26
26
  position,
@@ -30,7 +30,7 @@ export function useSlideAnimation({ position, height, topOffset, bottomOffset, k
30
30
  keyboardHeight,
31
31
  keyboardOffset
32
32
  })
33
- });
33
+ }), [position, height, topOffset, bottomOffset, keyboardHeight, keyboardOffset]);
34
34
  const opacity = animatedValue.current.interpolate({
35
35
  inputRange: [0, 0.7, 1],
36
36
  outputRange: [0, 1, 1]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-toast-message",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "Toast message component for React Native",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",