mirror of
https://github.com/expo/react-native-action-sheet.git
synced 2026-11-14 19:11:42 -10:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
64b8529472 |
No files matched your search
@@ -8,7 +8,7 @@ jobs:
|
||||
release-please:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
release-created: ${{ steps.release.outputs.releases_created }}
|
||||
release-created: ${{ steps.release.outputs.release_created }}
|
||||
steps:
|
||||
- uses: google-github-actions/release-please-action@v3
|
||||
id: release
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -14,17 +14,17 @@
|
||||
"dependencies": {
|
||||
"@expo/react-native-action-sheet": "../src",
|
||||
"@expo/vector-icons": "^13.0.0",
|
||||
"expo": "^46.0.0",
|
||||
"expo": "^48.0.0",
|
||||
"hoist-non-react-statics": "^3.3.0",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0",
|
||||
"react-native": "0.69.9",
|
||||
"react-native-web": "~0.18.7"
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-native": "0.71.3",
|
||||
"react-native-web": "~0.18.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "~18.0.0",
|
||||
"@types/react-native": "~0.69.1",
|
||||
"babel-preset-expo": "~9.2.0",
|
||||
"typescript": "^4.6.3"
|
||||
"@types/react": "~18.2.0",
|
||||
"@types/react-native": "~0.71.3",
|
||||
"babel-preset-expo": "^9.3.0",
|
||||
"typescript": "^4.9.4"
|
||||
}
|
||||
}
|
||||
+1848
-1347
File diff suppressed because it is too large.
Load diff
+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 & {
|
||||
|
||||
@@ -6,7 +6,7 @@ import { ActionSheetProps } from './types';
|
||||
|
||||
export default function connectActionSheet<OwnProps = any>(
|
||||
WrappedComponent: React.ComponentType<OwnProps & ActionSheetProps>
|
||||
): React.FunctionComponent<OwnProps> {
|
||||
): React.FunctionComponent<OwnProps & ActionSheetProps> {
|
||||
const ConnectedActionSheet = (props: OwnProps) => {
|
||||
return (
|
||||
<Consumer>
|
||||
|
||||
Reference in new issue
Block a user