From 153217c084e7a87280269527c2c07849fc0a326f Mon Sep 17 00:00:00 2001 From: Furkan Atakan BOZKURT Date: Thu, 3 Jul 2025 19:44:31 +0300 Subject: [PATCH 01/11] Update index.tsx Open system added to animation finish case. --- src/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 68586a5e..17e67766 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -292,8 +292,8 @@ const ModalizeBase = ( easing: timing.easing, useNativeDriver: USE_NATIVE_DRIVER, }), - ]).start(() => { - if (onOpened) { + ]).start(({finished}) => { + if (onOpened && finished) { onOpened(); } From b2b8de790698a7643a1b1ad4c6468e16b60835a2 Mon Sep 17 00:00:00 2001 From: Furkan Atakan BOZKURT Date: Sun, 20 Jul 2025 17:23:04 +0300 Subject: [PATCH 02/11] Update options.ts --- src/options.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/options.ts b/src/options.ts index d9a4d964..360796e6 100644 --- a/src/options.ts +++ b/src/options.ts @@ -42,6 +42,7 @@ export interface IConfigProps { } export interface IProps { + isMahmutTabClose?: boolean; /** * A reference to the view (ScrollView, FlatList, SectionList) that provides the scroll behavior, where you will be able to access their owns methods. */ From d9cd3a7b960284ff2567b7ba88773ad1be89dcb2 Mon Sep 17 00:00:00 2001 From: Furkan Atakan BOZKURT Date: Sun, 20 Jul 2025 17:24:27 +0300 Subject: [PATCH 03/11] Update index.tsx --- src/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index 68586a5e..6e5da6f2 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -97,6 +97,7 @@ const ModalizeBase = ( keyboardAvoidingOffset, panGestureEnabled = true, panGestureComponentEnabled = false, + isMahmutTabClose = false, tapGestureEnabled = true, closeOnOverlayTap = true, closeSnapPointStraightEnabled = true, @@ -781,7 +782,7 @@ const ModalizeBase = ( return ( {renderContent()} From bd42e8e5864d1a658da11a7b1da90043f47da6f0 Mon Sep 17 00:00:00 2001 From: Furkan Atakan BOZKURT Date: Sun, 20 Jul 2025 17:26:57 +0300 Subject: [PATCH 04/11] Update package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2d7a11c6..1a0848c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "react-native-modalize", - "version": "2.1.1", + "name": "react-native-modalize-x2", + "version": "2.1.3", "description": "A highly customizable modal/bottom sheet that loves scrolling content.", "main": "lib/index.js", "types": "./lib/index.d.ts", From 552bf4a68d8419ddbc6f0697f27218253a9fb497 Mon Sep 17 00:00:00 2001 From: Furkan Atakan BOZKURT Date: Wed, 30 Jul 2025 18:43:17 +0300 Subject: [PATCH 05/11] Update index.tsx scrollTreshold prop added. --- src/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index 6e5da6f2..f4db7f4b 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -87,6 +87,7 @@ const ModalizeBase = ( // Options handlePosition = 'outside', + scrollTreshold = 20, disableScrollIfPossible = true, avoidKeyboardLikeIOS = Platform.select({ ios: true, @@ -457,7 +458,7 @@ const ModalizeBase = ( translationY < 0; const thresholdProps = translationY > threshold && beginScrollYValue === 0; const closeThreshold = velocity - ? (beginScrollYValue <= 20 && velocityY >= velocity) || thresholdProps + ? (beginScrollYValue <= scrollTreshold && velocityY >= velocity) || thresholdProps : thresholdProps; let enableBouncesValue = true; From 22d47af8638180534e58e1c386c7aaf5767155b0 Mon Sep 17 00:00:00 2001 From: Furkan Atakan BOZKURT Date: Wed, 30 Jul 2025 18:43:44 +0300 Subject: [PATCH 06/11] Update options.ts scrollTreshold type added. --- src/options.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/options.ts b/src/options.ts index 360796e6..6621c6dd 100644 --- a/src/options.ts +++ b/src/options.ts @@ -42,7 +42,7 @@ export interface IConfigProps { } export interface IProps { - isMahmutTabClose?: boolean; + scrollTreshold?: number; /** * A reference to the view (ScrollView, FlatList, SectionList) that provides the scroll behavior, where you will be able to access their owns methods. */ From 83d46ce28630a6626a5356f4aec4e49af4f877a2 Mon Sep 17 00:00:00 2001 From: Furkan Atakan BOZKURT Date: Wed, 30 Jul 2025 18:44:22 +0300 Subject: [PATCH 07/11] Update index.tsx isMahmutTabClose prop removed. --- src/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index f4db7f4b..d41fdda2 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -98,7 +98,6 @@ const ModalizeBase = ( keyboardAvoidingOffset, panGestureEnabled = true, panGestureComponentEnabled = false, - isMahmutTabClose = false, tapGestureEnabled = true, closeOnOverlayTap = true, closeSnapPointStraightEnabled = true, @@ -783,7 +782,7 @@ const ModalizeBase = ( return ( {renderContent()} From a9934b25a30ada531bf0972088c30970d74ae809 Mon Sep 17 00:00:00 2001 From: lfabl Date: Wed, 30 Jul 2025 18:46:51 +0300 Subject: [PATCH 08/11] Bugfix: Gesture problem test. --- .gitignore | 2 ++ package.json | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 493fb121..ee8bf3fc 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ yarn.lock .vscode/ lib/ .watchmanconfig + +/.history diff --git a/package.json b/package.json index 2d7a11c6..0ca5a8cf 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,6 @@ "main": "lib/index.js", "types": "./lib/index.d.ts", "scripts": { - "build": "rm -rf ./lib/* && yarn lint && tsc", - "prepare": "yarn build", "lint": "eslint 'src/**/*.ts?(x)' && prettier --list-different \"**/*.{json,md,js,jsx,ts,tsx}\"", "prettier": "prettier --write \"{docs,examples,src}/**/*.{json,md,js,jsx,ts,tsx}\"", "postversion": "sh ./post-version.sh", From 7b4656f255f03e1d1015e50332bd599bd38e33cc Mon Sep 17 00:00:00 2001 From: lfabl Date: Wed, 30 Jul 2025 18:46:56 +0300 Subject: [PATCH 09/11] X: 1 --- package.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 0ca5a8cf..d2acaab3 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,8 @@ "main": "lib/index.js", "types": "./lib/index.d.ts", "scripts": { + "build": "rm -rf ./lib/* && yarn lint && tsc", + "prepare": "yarn build", "lint": "eslint 'src/**/*.ts?(x)' && prettier --list-different \"**/*.{json,md,js,jsx,ts,tsx}\"", "prettier": "prettier --write \"{docs,examples,src}/**/*.{json,md,js,jsx,ts,tsx}\"", "postversion": "sh ./post-version.sh", @@ -58,12 +60,6 @@ "@commitlint/config-conventional" ] }, - "husky": { - "hooks": { - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", - "pre-commit": "lint-staged" - } - }, "devDependencies": { "@commitlint/cli": "9.1.2", "@commitlint/config-conventional": "9.1.2", From 5e760e17b5f118b99f077ebaf894b4a62e0fdefc Mon Sep 17 00:00:00 2001 From: lfabl Date: Wed, 30 Jul 2025 18:48:35 +0300 Subject: [PATCH 10/11] Version. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0be19fcc..095c3f4d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-modalize-x2", - "version": "2.1.3", + "version": "2.1.6", "description": "A highly customizable modal/bottom sheet that loves scrolling content.", "main": "lib/index.js", "types": "./lib/index.d.ts", From 8443b0697b7619cb9756eb0a962ce668d377093c Mon Sep 17 00:00:00 2001 From: lfabl Date: Thu, 31 Jul 2025 15:58:42 +0300 Subject: [PATCH 11/11] Release: v2.1.7 --- package.json | 4 ++-- src/index.tsx | 16 +++++++++------- src/options.ts | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 095c3f4d..02d5e949 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "react-native-modalize-x2", - "version": "2.1.6", + "version": "2.1.7", "description": "A highly customizable modal/bottom sheet that loves scrolling content.", "main": "lib/index.js", "types": "./lib/index.d.ts", "scripts": { "build": "rm -rf ./lib/* && yarn lint && tsc", - "prepare": "yarn build", + "prepare": "yarn tsc", "lint": "eslint 'src/**/*.ts?(x)' && prettier --list-different \"**/*.{json,md,js,jsx,ts,tsx}\"", "prettier": "prettier --write \"{docs,examples,src}/**/*.{json,md,js,jsx,ts,tsx}\"", "postversion": "sh ./post-version.sh", diff --git a/src/index.tsx b/src/index.tsx index f450c412..54d94ecf 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -87,7 +87,6 @@ const ModalizeBase = ( // Options handlePosition = 'outside', - scrollTreshold = 20, disableScrollIfPossible = true, avoidKeyboardLikeIOS = Platform.select({ ios: true, @@ -113,6 +112,7 @@ const ModalizeBase = ( dragToss = 0.18, threshold = 120, velocity = 2800, + closeVelocity = 250, panGestureAnimatedValue, useNativeDriver = true, @@ -457,7 +457,7 @@ const ModalizeBase = ( translationY < 0; const thresholdProps = translationY > threshold && beginScrollYValue === 0; const closeThreshold = velocity - ? (beginScrollYValue <= scrollTreshold && velocityY >= velocity) || thresholdProps + ? (beginScrollYValue <= 20 && velocityY >= velocity) || thresholdProps : thresholdProps; let enableBouncesValue = true; @@ -531,12 +531,14 @@ const ModalizeBase = ( handleClose(); } } else { - destSnapPoint = snap; - willCloseModalize = false; + if(cancelTranslateY && toValue > closeVelocity) { + destSnapPoint = snap; + willCloseModalize = false; - if (snap === endHeight) { - willCloseModalize = true; - handleClose(); + if (snap === endHeight) { + willCloseModalize = true; + handleClose(); + } } } } diff --git a/src/options.ts b/src/options.ts index 6621c6dd..6f032fe4 100644 --- a/src/options.ts +++ b/src/options.ts @@ -42,7 +42,7 @@ export interface IConfigProps { } export interface IProps { - scrollTreshold?: number; + closeVelocity?: number; /** * A reference to the view (ScrollView, FlatList, SectionList) that provides the scroll behavior, where you will be able to access their owns methods. */