react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Android App crashes when we assign "Object" to disabled property in TouchableOpacity (React Native Version 0.70+).

Open MirUmair opened this issue 3 years ago • 5 comments

Summary

Android App crashes when we assign "Object" to disabled property in TouchableOpacity (React Native Version 0.70+).

For Example: <TouchableOpacity onPress={onPress} disabled={ {} } //it will show error disabled={ {} ? false : true } //it won't show error /> Error : Value for disabled cannot be cast from ReadableNativeMap to Boolean https://github.com/facebook/react-native/issues/35119#issue-1427134346

Changelog

Added double negation. const accessibilityState = this.props.disabled != null ? { ..._accessibilityState, disabled: this.props.disabled, disabled: !!this.props.disabled, } : _accessibilityState;

[Android] [Fixed] - Android bug fixed - Now Android App will not crash on passing "Object" to disabled property in TouchableOpacity (React Native Version 0.70+).

Test Plan

Now Android App will not crash on passing "Object" to disabled property in TouchableOpacity (React Native Version 0.70+).

MirUmair avatar Oct 28 '22 15:10 MirUmair

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,003,370 +16
android hermes armeabi-v7a 6,379,710 +19
android hermes x86 7,416,208 +23
android hermes x86_64 7,280,113 +22
android jsc arm64-v8a 8,868,338 +8
android jsc armeabi-v7a 7,606,656 +12
android jsc x86 8,926,232 +2
android jsc x86_64 9,409,469 +2

Base commit: d0f94e6c2d9f91ac8ffab5218ed95cac63df09e5 Branch: main

analysis-bot avatar Oct 28 '22 15:10 analysis-bot

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: d0f94e6c2d9f91ac8ffab5218ed95cac63df09e5 Branch: main

analysis-bot avatar Oct 28 '22 16:10 analysis-bot

PR build artifact for 17e4cc1458317e31d165aa7751edc3c8aeec4bd3 is ready. To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

pull-bot avatar Oct 28 '22 16:10 pull-bot

PR build artifact for 17e4cc1458317e31d165aa7751edc3c8aeec4bd3 is ready. To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

pull-bot avatar Oct 28 '22 16:10 pull-bot

How long it will take to merge this PR ?

mrshahzeb7 avatar Nov 04 '22 10:11 mrshahzeb7

@sshic has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Nov 14 '22 14:11 facebook-github-bot

@MirUmair Can you fix the circleci test failure?

luluwu2032 avatar Nov 14 '22 14:11 luluwu2032

@MirUmair Can you fix the circleci test failure? @sshic i don't know how to fix this test , i tried but failed .

MirUmair avatar Nov 14 '22 14:11 MirUmair

This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar May 13 '23 18:05 github-actions[bot]

This PR was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar May 21 '23 00:05 github-actions[bot]