mirror of
https://github.com/expo/react-native-action-sheet.git
synced 2026-11-14 19:11:42 -10:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b4765b813 | ||
|
|
80a6855275 |
No files matched your search
@@ -17,7 +17,7 @@ jobs:
|
||||
- name: ⚙️ Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '14'
|
||||
node-version: '18'
|
||||
cache: 'yarn'
|
||||
|
||||
- name: 🧱 Build
|
||||
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
- name: ⚙️ Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '14'
|
||||
node-version: '18'
|
||||
cache: 'yarn'
|
||||
|
||||
- name: 🧱 Build
|
||||
|
||||
@@ -1,25 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## [4.1.1](https://github.com/expo/react-native-action-sheet/compare/v4.1.0...v4.1.1) (2025-02-21)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Removal of `BackHandler.removeEventListener` in react-native ([#339](https://github.com/expo/react-native-action-sheet/issues/339)) ([b7e050c](https://github.com/expo/react-native-action-sheet/commit/b7e050c9abab17b9a3ac21afed5bc73cecbecd6d))
|
||||
* show touch feedback on iOS when using custom action sheet ([#329](https://github.com/expo/react-native-action-sheet/issues/329)) ([1ce802b](https://github.com/expo/react-native-action-sheet/commit/1ce802b8f095f9c553002dd84cae694a30c2dc01))
|
||||
|
||||
## [4.1.0](https://github.com/expo/react-native-action-sheet/compare/v4.0.1...v4.1.0) (2024-05-15)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* update peer dep ([#324](https://github.com/expo/react-native-action-sheet/issues/324)) ([bc33f9f](https://github.com/expo/react-native-action-sheet/commit/bc33f9f4d0c171ff17c098f94fab1b22ed6816ed))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* use release-please instead of semantic release ([#300](https://github.com/expo/react-native-action-sheet/issues/300)) ([b35a403](https://github.com/expo/react-native-action-sheet/commit/b35a403a213d596252ec5e8a20db5291396fafc0))
|
||||
|
||||
## [4.0.1](https://github.com/expo/react-native-action-sheet/compare/v4.0.0...v4.0.1) (2022-11-04)
|
||||
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"hoist-non-react-statics": "^3.3.0",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0",
|
||||
"react-native": "0.69.9",
|
||||
"react-native": "0.69.6",
|
||||
"react-native-web": "~0.18.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
+4
-4
@@ -6546,10 +6546,10 @@ react-native-web@~0.18.7:
|
||||
postcss-value-parser "^4.2.0"
|
||||
styleq "^0.1.2"
|
||||
|
||||
[email protected].9:
|
||||
version "0.69.9"
|
||||
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.69.9.tgz#c988dfc2e21b3b586d35a8cc57b102537e760edc"
|
||||
integrity sha512-I1xqIn47RWxBToO4E6yqyIPSaK9mZnMiscMfrFpWjQr3Gdkicr9y+twmtrRszxaLdQLjHzh/M3y4qOqc3hZnpg==
|
||||
[email protected].6:
|
||||
version "0.69.6"
|
||||
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.69.6.tgz#cdd1a5757d902b91b165c28fdda4e518ed6f683a"
|
||||
integrity sha512-wwXpqM+12kdEYdBZCJUb5SBu95CzgejrwFeYJ78RzHZV/Sj6DBRekbsHGrDDsY4R25QXALQxy4DQYQCObVvWjA==
|
||||
dependencies:
|
||||
"@jest/create-cache-key-function" "^27.0.1"
|
||||
"@react-native-community/cli" "^8.0.4"
|
||||
|
||||
+4
-5
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@expo/react-native-action-sheet",
|
||||
"version": "4.1.1",
|
||||
"version": "4.0.1",
|
||||
"description": "A cross-platform ActionSheet for React Native",
|
||||
"react-native": "lib/module/index.js",
|
||||
"types": "lib/typescript/index.d.ts",
|
||||
@@ -43,13 +43,12 @@
|
||||
"husky": "^3.0.0",
|
||||
"lint-staged": "^9.2.0",
|
||||
"prettier": "^2.3.2",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0",
|
||||
"react-native": "0.69.9",
|
||||
"react": "^16.8.6",
|
||||
"react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
|
||||
"typescript": "^3.5.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=18.0.0"
|
||||
"react": ">=16.3.0"
|
||||
},
|
||||
"@react-native-community/bob": {
|
||||
"source": "src",
|
||||
|
||||
@@ -4,7 +4,6 @@ import {
|
||||
BackHandler,
|
||||
Easing,
|
||||
Modal,
|
||||
NativeEventSubscription,
|
||||
Platform,
|
||||
StyleSheet,
|
||||
TouchableWithoutFeedback,
|
||||
@@ -39,7 +38,6 @@ const ESCAPE_KEY = 'Escape';
|
||||
// Has same API as https://facebook.github.io/react-native/docs/actionsheetios.html
|
||||
export default class CustomActionSheet extends React.Component<Props, State> {
|
||||
_actionSheetHeight = 360;
|
||||
_backHandlerListener: NativeEventSubscription | undefined;
|
||||
|
||||
state: State = {
|
||||
isVisible: false,
|
||||
@@ -229,12 +227,8 @@ export default class CustomActionSheet extends React.Component<Props, State> {
|
||||
this._deferAfterAnimation = undefined;
|
||||
}
|
||||
});
|
||||
|
||||
this._backHandlerListener = BackHandler.addEventListener(
|
||||
// @ts-ignore: Argument of type '"actionSheetHardwareBackPress"' is not assignable to parameter of type '"hardwareBackPress"'
|
||||
'actionSheetHardwareBackPress',
|
||||
this._selectCancelButton
|
||||
);
|
||||
// @ts-ignore: Argument of type '"actionSheetHardwareBackPress"' is not assignable to parameter of type '"hardwareBackPress"'
|
||||
BackHandler.addEventListener('actionSheetHardwareBackPress', this._selectCancelButton);
|
||||
};
|
||||
|
||||
_selectCancelButton = () => {
|
||||
@@ -275,9 +269,8 @@ export default class CustomActionSheet extends React.Component<Props, State> {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this._backHandlerListener) {
|
||||
this._backHandlerListener.remove();
|
||||
}
|
||||
// @ts-ignore: Argument of type '"actionSheetHardwareBackPress"' is not assignable to parameter of type '"hardwareBackPress"'
|
||||
BackHandler.removeEventListener('actionSheetHardwareBackPress', this._selectCancelButton);
|
||||
this.setState({
|
||||
isAnimating: true,
|
||||
});
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
TouchableWithoutFeedbackProps,
|
||||
} from 'react-native';
|
||||
|
||||
// This TouchableOpacity has the same static method of TouchableNativeFeedback
|
||||
// This TouchableOpacity has the same staic method of TouchableNativeFeedback
|
||||
class CustomTouchableOpacity extends React.Component {
|
||||
static SelectableBackground = () => ({});
|
||||
static SelectableBackgroundBorderless = () => ({});
|
||||
@@ -19,8 +19,8 @@ class CustomTouchableOpacity extends React.Component {
|
||||
}
|
||||
|
||||
const TouchableComponent = Platform.select({
|
||||
default: CustomTouchableOpacity,
|
||||
android: Platform.Version <= 20 ? CustomTouchableOpacity : TouchableNativeFeedback,
|
||||
web: CustomTouchableOpacity,
|
||||
default: Platform.Version <= 20 ? CustomTouchableOpacity : TouchableNativeFeedback,
|
||||
});
|
||||
|
||||
type Props = TouchableWithoutFeedbackProps & {
|
||||
|
||||
Reference in new issue
Block a user