@@ -1,6 +1,6 @@
{
"name": "ncore-ui-kit",
- "version": "1.5.0-pre-alpha.6",
+ "version": "1.5.0-pre-alpha.7",
"description": "NİBGAT® | NCore - UI Kit for React-Native Mobile Apps.",
"main": "./lib/module/index.js",
"types": "./lib/typescript/src/index.d.ts",
@@ -113,6 +113,8 @@ const SnackBar: FC<ISnackBarProps> = ({
});
useEffect(() => {
+ let timeout: NodeJS.Timeout;
+
if(isMeasured) {
transformAnim.setValue(-contentHeight.current + -top + -spaces.spacingSm);
@@ -131,10 +133,16 @@ const SnackBar: FC<ISnackBarProps> = ({
})
]).start();
- setTimeout(() => {
+ timeout = setTimeout(() => {
closeAnimation();
}, autoCloseDelay);
}
+ return () => {
+ if(timeout) {
+ clearTimeout(timeout);
+ }
+ };
}, [
isMeasured
]);
@@ -108,9 +108,13 @@ const Toast: FC<IToastProps> = ({
+ const timeout = setTimeout(() => {
}, []);
const closeAnimation = (_onClosed?: (props: {
@@ -60,10 +60,9 @@ export const Manager = forwardRef(({
children,
key
- },
- index: number
) => <View
- key={`NCoreUIKit-Portal-${key}-${index}`}
+ key={`NCoreUIKit-Portal-${key}`}
style={[
StyleSheet.absoluteFill
]}